Skip to content

Commit

Permalink
EditorConfig: Fix #2472
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Jul 22, 2020
1 parent 627f1f4 commit f0e62b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions components/prism-editorconfig.js
Expand Up @@ -2,15 +2,19 @@ Prism.languages.editorconfig = {
// https://editorconfig-specification.readthedocs.io/en/latest/
'comment': /[;#].*/,
'section': {
pattern: /^[ \t]*\[.+]/m,
pattern: /(^[ \t]*)\[.+]/m,
lookbehind: true,
alias: 'keyword',
inside: {
'regex': /\\\\[\[\]{},!?.*]/, // Escape special characters with '\\'
'operator': /[!?]|\.\.|\*{1,2}/,
'punctuation': /[\[\]{},]/
}
},
'property': /^[ \t]*[^\s=]+(?=[ \t]*=)/m,
'property': {
pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
lookbehind: true
},
'value': {
pattern: /=.*/,
alias: 'string',
Expand Down
2 changes: 1 addition & 1 deletion components/prism-editorconfig.min.js

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

0 comments on commit f0e62b0

Please sign in to comment.