diff --git a/docs/python-string-sql-1.1.0.vsix b/docs/python-string-sql-1.1.0.vsix new file mode 100644 index 0000000..14a230d Binary files /dev/null and b/docs/python-string-sql-1.1.0.vsix differ diff --git a/package.json b/package.json index a18771e..098c6c1 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,16 @@ "embeddedLanguages": { "meta.embedded.sql": "sql" } + }, + { + "path": "./syntaxes/highlight-html-string.json", + "scopeName": "python-html.injection", + "injectTo": [ + "source.python" + ], + "embeddedLanguages": { + "meta.embedded.block.html": "html" + } } ], "snippets": [ diff --git a/syntaxes/highlight-html-string.json b/syntaxes/highlight-html-string.json new file mode 100644 index 0000000..85af0c1 --- /dev/null +++ b/syntaxes/highlight-html-string.json @@ -0,0 +1,57 @@ +{ + "fileTypes": [ + "py" + ], + "injectionSelector": "L:string.quoted.multi.python, L:meta.fstring.python - (comment.line.number-sign.python, punctuation.definition.comment.python)", + "repository": { + "keep-variables": { + "patterns": [ + { + "begin": "\\{", + "end": "\\}", + "beginCaptures": { + "1": { + "name": "punctuation.section.embedded.begin.py" + }, + "2": { + "name": "punctuation.section.embedded" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.section.embedded.end.py" + }, + "2": { + "name": "punctuation.section.embedded" + } + }, + "patterns": [ + { + "include": "text.html.derivative" + } + ] + } + ] + } + }, + "patterns": [ + { + "begin": "( *--html| *--beginhtml| *--begin-html)", + "end": "( *--\\!html| *--endhtml| *--end-html)", + "captures": { + "1": { + "name": "variable.parameter" + } + }, + "patterns": [ + { + "include": "text.html.derivative" + }, + { + "include": "#keep-variables" + } + ] + } + ], + "scopeName": "python-html.injection" +} \ No newline at end of file