Skip to content

Commit

Permalink
fix comment highlighting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
matubu committed Jan 2, 2022
1 parent a6deaac commit 221425d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@speed-highlight/core",
"version": "1.1.3",
"version": "1.1.4",
"description": "🌈 Light, fast, and easy to use, dependencies free javascript syntax highlighter, with automatic language detection",
"main": "dist/node/index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/languages/lua.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default [
{
match: /^#!.*|--(\[(=*)\[((?!--\]\2\])[^])*--\]\2\]|.*)/g,
sub: 'TODO'
sub: 'todo'
},
{
expand: 'str'
Expand Down
2 changes: 1 addition & 1 deletion src/languages/pl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default [
{
match: /#.*/g,
sub: 'TODO'
sub: 'todo'
},
{
type: 'str',
Expand Down
10 changes: 5 additions & 5 deletions src/languages/py.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export default [
{
match: /#.*/g,
sub: 'TODO'
sub: 'todo'
},
{
match: /("""|''')(\\[^]|(?!\1)[^])*\1?/g,
sub: 'todo'
},
{
type: 'str',
Expand All @@ -19,10 +23,6 @@ export default [
}
]
},
{
match: /("""|''')(\\[^]|(?!\1)[^])*\1?/g,
sub: 'TODO'
},
{
expand: 'str'
},
Expand Down
2 changes: 1 addition & 1 deletion src/languages/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export let property = '\\s*(\\s+[a-z-]+\\s*(=\\s*([^"\']\\S*|("|\')(\\\\[^]|(?!\
export default [
{
match: /<!--((?!-->)[^])*-->/g,
sub: 'TODO'
sub: 'todo'
},
{
type: 'class',
Expand Down

0 comments on commit 221425d

Please sign in to comment.