Skip to content

Commit ae17566

Browse files
bobyuqu
authored andcommitted
changed to rawDescription to remove <p> tags
1 parent 89512c6 commit ae17566

6 files changed

Lines changed: 19 additions & 25 deletions

File tree

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zeplin/cli-connect-angular-plugin",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "Zeplin CLI Connected Components - Angular Plugin",
55
"main": "./dist/index",
66
"scripts": {

src/template/description-full.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ block content
55
| # #{component.name}
66
+list("extends", component._extends)
77
+list("implements", component._implements)
8-
if component.description.length > 0
8+
if component.rawDescription.length > 0
99
+linebreak(1)
10-
| !{component.description}
10+
| !{component.rawDescription}
1111
if index !== (components.length - 1)
1212
+linebreak(2)

src/template/description-summary.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ extends base
33
block content
44
each component, index in components
55
| #### #{component.name}#{(component._extends ? " extends " + component._extends : "")}
6-
if component.description.length > 0
6+
if component.rawDescription.length > 0
77
|
8-
| !{component.description}
8+
| !{component.rawDescription}
99
if index !== (components.length - 1)
1010
+linebreak(3)

test/__snapshots__/index.test.ts.snap

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
exports[`Connected Components Angular Plugin component.ts snippet creation 1`] = `
44
Object {
55
"description": "#### BankAccount
6-
<p>This is a bank account component</p>
7-
6+
This is a bank account component
7+
This is line 2 description
88
99
1010
#### BankAccountHolder
11-
<p>This is a bank account holder component</p>
12-
",
11+
This is a bank account holder component",
1312
"lang": "markup",
1413
"snippet": "<!--- BankAccount examples --->
1514
<!--- Possible selectors:
@@ -35,13 +34,11 @@ Object {
3534
exports[`Connected Components Angular Plugin componentWithDecoratorInputs.ts snippet creation 1`] = `
3635
Object {
3736
"description": "#### BankAccount
38-
<p>This is a bank account component</p>
39-
37+
This is a bank account component
4038
4139
4240
#### BankAccountHolder
43-
<p>This is a bank account holder component</p>
44-
",
41+
This is a bank account holder component",
4542
"lang": "markup",
4643
"snippet": "<!--- BankAccount examples --->
4744
<!--- Possible selectors:
@@ -67,13 +64,11 @@ Object {
6764
exports[`Connected Components Angular Plugin componentWithFileTemplate.ts snippet creation 1`] = `
6865
Object {
6966
"description": "#### BankAccount
70-
<p>This is a bank account component</p>
71-
67+
This is a bank account component
7268
7369
7470
#### BankAccountHolder
75-
<p>This is a bank account holder component</p>
76-
",
71+
This is a bank account holder component",
7772
"lang": "markup",
7873
"snippet": "<!--- BankAccount examples --->
7974
<!--- Possible selectors:
@@ -99,13 +94,11 @@ Object {
9994
exports[`Connected Components Angular Plugin componentWithMultiSelectors.ts snippet creation 1`] = `
10095
Object {
10196
"description": "#### BankAccount
102-
<p>This is a bank account component</p>
103-
97+
This is a bank account component
10498
10599
106100
#### BankAccountHolder
107-
<p>This is a bank account holder component</p>
108-
",
101+
This is a bank account holder component",
109102
"lang": "markup",
110103
"snippet": "<!--- BankAccount examples --->
111104
<!--- Possible selectors:
@@ -134,12 +127,10 @@ Object {
134127
exports[`Connected Components Angular Plugin componentWithMultiSelectors.ts snippet creation 2`] = `
135128
Object {
136129
"description": "# BankAccount
137-
<p>This is a bank account component</p>
138-
130+
This is a bank account component
139131
140132
# BankAccountHolder
141-
<p>This is a bank account holder component</p>
142-
",
133+
This is a bank account holder component",
143134
"lang": "markup",
144135
"snippet": "<!--- BankAccount examples --->
145136
<bank-account

test/samples/component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
22
* This is a bank account component
3+
* This is line 2 description
34
*/
45
@Component({
56
selector: 'bank-account',

0 commit comments

Comments
 (0)