Skip to content

Commit

Permalink
fix: props without a trailing whitespace (#6) (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX authored Feb 11, 2024
1 parent 4e287f0 commit aa6257b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/parse/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export function searchProps(content: string, index = 0) {
])
}
}
index += 1
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/input/6.inline-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Hello World{class="text-green text-xl"}

_italic_{style="color: blue"}

**bold**{style="color: blue"}
**bold**{style="color: blue"}!

Check failure on line 13 in test/input/6.inline-props.md

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found
2 changes: 1 addition & 1 deletion test/input/7.inline-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ A simple :inline-component[John Doe]

How to say :hello{}-world in Markdown

Inline :component{key="value" key2=value2}
Inline :component{key="value" key2=value2}!

Check failure on line 7 in test/input/7.inline-components.md

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found
2 changes: 2 additions & 0 deletions test/input/8.inline-span.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ Hello [World]
Hello [World]{.bg-blue-500}!

Hello [World\] Yes]!

Hello [World]{style=""}!

Check failure on line 7 in test/input/8.inline-span.md

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found
2 changes: 1 addition & 1 deletion test/output/6.inline-props.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ <h1 class="text-red">Hello</h1>
</p>
<p><code style="color: red">code</code></p>
<p><em style="color: blue">italic</em></p>
<p><strong style="color: blue">bold</strong></p>
<p><strong style="color: blue">bold</strong>!</p>
2 changes: 1 addition & 1 deletion test/output/7.inline-components.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>A simple <inline-component /></p>
<p>A simple <inline-component>John Doe</inline-component></p>
<p>How to say <hello />-world in Markdown</p>
<p>Inline <component key="value" key2="value2" /></p>
<p>Inline <component key="value" key2="value2" />!</p>
3 changes: 2 additions & 1 deletion test/output/8.inline-span.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<p>Hello <span>World</span></p>
<p>Hello <span class="bg-blue-500">World</span>!</p>
<p>Hello <span>World\] Yes</span>!</p>
<p>Hello <span>World\] Yes</span>!</p>
<p>Hello <span style="">World</span>!</p>

0 comments on commit aa6257b

Please sign in to comment.