Skip to content

Commit

Permalink
AutoIt: Allow hyphen in directive (#3308)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonweiting authored Jan 24, 2022
1 parent deb3a97 commit bcb2e2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/prism-autoit.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 19,7 @@ Prism.languages.autoit = {
}
},
'directive': {
pattern: /(^[\t ]*)#\w /m,
pattern: /(^[\t ]*)#[\w-] /m,
lookbehind: true,
alias: 'keyword'
},
Expand Down
2 changes: 1 addition & 1 deletion components/prism-autoit.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions tests/languages/autoit/directive_feature.test
Original file line number Diff line number Diff line change
@@ -1,13 1,17 @@
#NoTrayIcon
#OnAutoItStartRegister "Example"
#include-once
#include <MsgBoxConstants.au3>

----------------------------------------------------

[
["directive", "#NoTrayIcon"],
["directive", "#OnAutoItStartRegister"], ["string", ["\"Example\""]]
["directive", "#OnAutoItStartRegister"], ["string", ["\"Example\""]],
["directive", "#include-once"],
["directive", "#include"], ["url", "<MsgBoxConstants.au3>"]
]

----------------------------------------------------

Checks for directives.
Checks for directives.

0 comments on commit bcb2e2c

Please sign in to comment.