Skip to content

fix: add word boundray to check markdown italic #41466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/markdown/syntaxes/markdown.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -3318,7 +3318,7 @@
<dict>
<key>begin</key>
<string>(?x)
(\*|_)(?=\S) # Open
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update markdown.tmLanguage.base as well. We use that file to generate this one. You can run the generator using (cd extensions/markdown; npm run update-grammar)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 3371 must be changed from
<string>(?&lt;=\S)(\1)((?!\1)|(?=\1\1))</string>
to
<string>(?&lt;=\S)(\1)((?!\1)|(?=\1\1))\b</string>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for review. I will fix that today

\b(\*|_)(?=\S) # Open
(?=
(
&lt;[^&gt;]*+&gt; # HTML tags
Expand Down Expand Up @@ -3368,7 +3368,7 @@
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\S)(\1)((?!\1)|(?=\1\1))</string>
<string>(?&lt;=\S)(\1)((?!\1)|(?=\1\1))\b</string>
<key>name</key>
<string>markup.italic.markdown</string>
<key>patterns</key>
Expand Down
4 changes: 2 additions & 2 deletions extensions/markdown/syntaxes/markdown.tmLanguage.base
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@
<dict>
<key>begin</key>
<string>(?x)
(\*|_)(?=\S) # Open
\b(\*|_)(?=\S) # Open
(?=
(
&lt;[^&gt;]*+&gt; # HTML tags
Expand Down Expand Up @@ -858,7 +858,7 @@
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\S)(\1)((?!\1)|(?=\1\1))</string>
<string>(?&lt;=\S)(\1)((?!\1)|(?=\1\1))\b</string>
<key>name</key>
<string>markup.italic.markdown</string>
<key>patterns</key>
Expand Down