Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit bb8315a

Browse files
authored
Merge pull request #785 from hayesr/html_onenterrules
feat(erb): add HTML onEnterRules
2 parents 452e612 + 4360b45 commit bb8315a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/vscode-ruby/language-configuration-erb.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,29 @@
3232
["`", "`"],
3333
["<", ">"],
3434
["%", "%"]
35+
],
36+
"onEnterRules": [
37+
{
38+
"beforeText": {
39+
"pattern": "<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr))([_:\\w][_:\\w-.\\d]*)(?:(?:[^'\"/>]|\"[^\"]*\"|'[^']*')*?(?!\\/)>)[^<]*$",
40+
"flags": "i"
41+
},
42+
"afterText": {
43+
"pattern": "^<\\/([_:\\w][_:\\w-.\\d]*)\\s*>",
44+
"flags": "i"
45+
},
46+
"action": {
47+
"indent": "indentOutdent"
48+
}
49+
},
50+
{
51+
"beforeText": {
52+
"pattern": "<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr))([_:\\w][_:\\w-.\\d]*)(?:(?:[^'\"/>]|\"[^\"]*\"|'[^']*')*?(?!\\/)>)[^<]*$",
53+
"flags": "i"
54+
},
55+
"action": {
56+
"indent": "indent"
57+
}
58+
}
3559
]
3660
}

0 commit comments

Comments
 (0)