Skip to content

Commit

Permalink
Fix regexp patterns for Nevod language.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-surkov committed Mar 18, 2021
1 parent 1e009ec commit 0c23fbe
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
29 changes: 21 additions & 8 deletions components/prism-nevod.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,29 @@ Prism.languages.nevod = {
alias: 'span',
},
],
'attr-capture': {
pattern: /[a-zA-Z0-9\-.]+\s*:/,
inside: {
'attr-name': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'variable',
'attr-capture': [
{
pattern: /([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,
lookbehind: true,
inside: {
'attr-name': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'variable',
},
'colon': /:/,
},
'colon': /:/,
},
},
{
pattern: /[a-zA-Z0-9\-.]+\s*:/,
inside: {
'attr-name': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'variable',
},
'colon': /:/,
},
},
],
'punctuation': /[:;,()]/,
'name': /[a-zA-Z0-9\-.]+/
}
2 changes: 1 addition & 1 deletion components/prism-nevod.min.js

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

0 comments on commit 0c23fbe

Please sign in to comment.