scopeName: 'source.riot'
name: 'HTML (Riotjs)'
fileTypes: [
'riot'
]
patterns: [
# HTML -------------------------------
{
name: 'meta.tag.any.html'
begin: '(?)([a-zA-Z0-9_-]+)'
beginCaptures:
'1':
name: 'punctuation.definition.tag.begin.html'
'2':
name: 'entity.name.tag.any.html'
end: '>'
endCaptures:
'0':
name: 'punctuation.definition.tag.end.html'
patterns: [
{ 'include': '#riotExpressions' }
{ 'include': '#tagStuff' }
]
}
# ------------------------------- HTML
# Script -------------------------------
{
name: "source.js.embedded.html"
begin: "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>|lang=[\"'].*[\"'])"
beginCaptures:
"1":
name: "punctuation.definition.tag.html"
"2":
name: "entity.name.tag.script.html"
end: "(?<=(script|SCRIPT))(>)(?:\\s*\\n)?"
endCaptures:
"2":
name: "punctuation.definition.tag.html"
patterns: [
{
include: "#tag-stuff"
}
{
begin: "(?)"
end: "()((?i:script))"
captures:
"1":
name: "punctuation.definition.tag.html"
"2":
name: "entity.name.tag.script.html"
patterns: [
{
name: "comment.line.double-slash.js"
begin: "//"
end: "$|(?=]*(?:(?:/>)|(?:type="(?:text/)?(?:sass|scss)")))'
end: '()(style)(>)(?:\\s*\\n)?'
captures:
'1':
name: 'punctuation.definition.tag.begin.html'
'2':
name: 'entity.name.tag.style.html'
'3':
name: 'punctuation.definition.tag.end.html'
patterns: [
{ include: '#tagStuff' }
{
begin: '(>)'
end: '(?=]*type="(?:text/)?sass")'
end: '()(style)(>)(?:\\s*\\n)?'
captures:
'1':
name: 'punctuation.definition.tag.begin.html'
'2':
name: 'entity.name.tag.style.html'
'3':
name: 'punctuation.definition.tag.end.html'
patterns: [
{ include: '#tagStuff' }
{
begin: '(>)'
end: '(?=]*type="(?:text/)?scss")'
end: '()(style)(>)(?:\\s*\\n)?'
captures:
'1':
name: 'punctuation.definition.tag.begin.html'
'2':
name: 'entity.name.tag.style.html'
'3':
name: 'punctuation.definition.tag.end.html'
patterns: [
{ include: '#tagStuff' }
{
begin: '(>)'
end: '(?=)'
patterns: [
{
name: 'string.quoted.double.html'
contentName: 'meta.toc-list.id.html'
begin: '"'
beginCaptures:
'0':
name: 'punctuation.definition.string.begin.html'
end: '"'
endCaptures:
'0':
name: 'punctuation.definition.string.end.html'
}
{
name: 'string.quoted.single.html'
contentName: 'meta.toc-list.id.html'
begin: '\''
beginCaptures:
'0':
name: 'punctuation.definition.string.begin.html'
end: '\''
endCaptures:
'0':
name: 'punctuation.definition.string.end.html'
}
]
tagStuff:
patterns: [
{ include: '#tagIdAttribute' }
{ include: '#tagGenericAttribute' }
{ include: '#stringDoubleQuoted' }
{ include: '#stringSingleQuoted' }
]