diff --git a/markdown.tmLanguage.base.yaml b/markdown.tmLanguage.base.yaml
index 4a0dd61..6b0ca79 100644
--- a/markdown.tmLanguage.base.yaml
+++ b/markdown.tmLanguage.base.yaml
@@ -97,7 +97,7 @@ repository:
- begin: (?i)(^|\G)\s*(?=<(script|style|pre)(\s|$|>)(?!.*?(script|style|pre)>))
end: (?i)(.*)(()(script|style|pre)(>))
endCaptures:
- '1': { patterns: [ {include: text.html.basic} ]}
+ '1': { patterns: [ {include: text.html.derivative} ]}
'2': {name: meta.tag.structure.$4.end.html}
'3': {name: punctuation.definition.tag.begin.html}
'4': {name: entity.name.tag.html}
@@ -105,15 +105,15 @@ repository:
patterns:
- begin: (\s*|$)
patterns:
- - {include: text.html.basic}
+ - {include: text.html.derivative}
while: (?i)^(?!.*(script|style|pre)>)
- - begin: (?i)(^|\G)\s*(?=?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(\s|$|/?>))
+ - begin: (?i)(^|\G)\s*(?=?[a-zA-Z]+[^\s/>]*(\s|$|/?>))
patterns:
- - {include: text.html.basic}
+ - {include: text.html.derivative}
while: ^(?!\s*$)
- begin: (^|\G)\s*(?=(<[a-zA-Z0-9\-](/?>|\s.*?>)|[a-zA-Z0-9\-]>)\s*$)
patterns:
- - {include: text.html.basic}
+ - {include: text.html.derivative}
while: ^(?!\s*$)
link-def:
captures:
@@ -149,7 +149,7 @@ repository:
name: meta.paragraph.markdown
patterns:
- {include: '#inline'}
- - {include: text.html.basic}
+ - {include: text.html.derivative}
- {include: '#heading-setext'}
while: (^|\G)(?!\s*$|#|[ ]{0,3}([-*_>][ ]{2,}){3,}[ \t]*$\n?|[ ]{0,3}[*+->]|[
]{0,3}[0-9]+\.)
@@ -177,7 +177,7 @@ repository:
name: meta.paragraph.markdown
patterns:
- {include: '#inline'}
- - {include: text.html.basic}
+ - {include: text.html.derivative}
- {include: '#heading-setext'}
while: (^|\G)((?=\s*[-=]{3,}\s*$)|[ ]{4,}(?=\S))
raw_block: {begin: '(^|\G)([ ]{4}|\t)', name: markup.raw.block.markdown, while: '(^|\G)([
@@ -260,7 +260,7 @@ repository:
begin: (?=<[^>]*?>)
end: (?<=>)
patterns:
- - {include: text.html.basic}
+ - {include: text.html.derivative}
- {include: '#escape'}
- {include: '#ampersand'}
- {include: '#bracket'}
@@ -372,7 +372,7 @@ repository:
begin: (?=<[^>]*?>)
end: (?<=>)
patterns:
- - {include: text.html.basic}
+ - {include: text.html.derivative}
- {include: '#escape'}
- {include: '#ampersand'}
- {include: '#bracket'}
diff --git a/syntaxes/markdown.tmLanguage b/syntaxes/markdown.tmLanguage
index 06c3203..da659e4 100644
--- a/syntaxes/markdown.tmLanguage
+++ b/syntaxes/markdown.tmLanguage
@@ -192,7 +192,7 @@
include
- text.html.basic
+ text.html.derivative
@@ -616,7 +616,7 @@
include
- text.html.basic
+ text.html.derivative
include
@@ -3152,7 +3152,7 @@
include
- text.html.basic
+ text.html.derivative
@@ -3186,7 +3186,7 @@
include
- text.html.basic
+ text.html.derivative
while
@@ -3196,12 +3196,12 @@
begin
- (?i)(^|\G)\s*(?=</?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(\s|$|/?>))
+ (?i)(^|\G)\s*(?=</?[a-zA-Z]+[^\s/>]*(\s|$|/?>))
patterns
include
- text.html.basic
+ text.html.derivative
while
@@ -3214,7 +3214,7 @@
include
- text.html.basic
+ text.html.derivative
while
@@ -3323,7 +3323,7 @@
include
- text.html.basic
+ text.html.derivative
include
@@ -3409,7 +3409,7 @@
include
- text.html.basic
+ text.html.derivative
include
@@ -3589,7 +3589,7 @@
include
- text.html.basic
+ text.html.derivative
@@ -3868,7 +3868,7 @@
include
- text.html.basic
+ text.html.derivative
diff --git a/test/colorize-fixtures/issue-53.md b/test/colorize-fixtures/issue-53.md
new file mode 100644
index 0000000..44b623e
--- /dev/null
+++ b/test/colorize-fixtures/issue-53.md
@@ -0,0 +1,5 @@
+PascalCase
+
+
+
+text PascalCase text
diff --git a/test/colorize-results/issue-42_md.json b/test/colorize-results/issue-42_md.json
index a142768..7e5f638 100644
--- a/test/colorize-results/issue-42_md.json
+++ b/test/colorize-results/issue-42_md.json
@@ -221,13 +221,13 @@
},
{
"c": "Sequence",
- "t": "text.html.markdown markup.fenced_code.block.markdown",
+ "t": "text.html.markdown markup.fenced_code.block.markdown meta.embedded.block.swift meta.definition.function.swift meta.generic-parameter-clause.swift meta.generic-parameter-constraint.swift entity.other.inherited-class.swift meta.type-name.swift support.type.swift",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "dark_plus": "support.type: #4EC9B0",
+ "light_plus": "support.type: #267F99",
+ "dark_vs": "meta.embedded: #D4D4D4",
+ "light_vs": "meta.embedded: #000000",
+ "hc_black": "support.type: #4EC9B0"
}
},
{
@@ -617,13 +617,13 @@
},
{
"c": "=",
- "t": "text.html.markdown markup.fenced_code.block.markdown",
+ "t": "text.html.markdown markup.fenced_code.block.markdown meta.embedded.block.swift keyword.operator.custom.infix.swift",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
}
},
{
@@ -826,13 +826,13 @@
},
{
"c": "+=",
- "t": "text.html.markdown markup.fenced_code.block.markdown",
+ "t": "text.html.markdown markup.fenced_code.block.markdown meta.embedded.block.swift keyword.operator.custom.infix.swift",
"r": {
- "dark_plus": "default: #D4D4D4",
- "light_plus": "default: #000000",
- "dark_vs": "default: #D4D4D4",
- "light_vs": "default: #000000",
- "hc_black": "default: #FFFFFF"
+ "dark_plus": "keyword.operator: #D4D4D4",
+ "light_plus": "keyword.operator: #000000",
+ "dark_vs": "keyword.operator: #D4D4D4",
+ "light_vs": "keyword.operator: #000000",
+ "hc_black": "keyword.operator: #D4D4D4"
}
},
{
diff --git a/test/colorize-results/issue-53_md.json b/test/colorize-results/issue-53_md.json
new file mode 100644
index 0000000..8be1003
--- /dev/null
+++ b/test/colorize-results/issue-53_md.json
@@ -0,0 +1,343 @@
+[
+ {
+ "c": "<",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.begin.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "StackLayout",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative entity.name.tag.html",
+ "r": {
+ "dark_plus": "entity.name.tag: #569CD6",
+ "light_plus": "entity.name.tag: #800000",
+ "dark_vs": "entity.name.tag: #569CD6",
+ "light_vs": "entity.name.tag: #800000",
+ "hc_black": "entity.name.tag: #569CD6"
+ }
+ },
+ {
+ "c": " ",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "orientation",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.orientation.html entity.other.attribute-name.html",
+ "r": {
+ "dark_plus": "entity.other.attribute-name: #9CDCFE",
+ "light_plus": "entity.other.attribute-name: #FF0000",
+ "dark_vs": "entity.other.attribute-name: #9CDCFE",
+ "light_vs": "entity.other.attribute-name: #FF0000",
+ "hc_black": "entity.other.attribute-name: #9CDCFE"
+ }
+ },
+ {
+ "c": "=",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.orientation.html punctuation.separator.key-value.html",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.orientation.html string.quoted.double.html punctuation.definition.string.begin.html",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string.quoted.double.html: #0000FF",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string.quoted.double.html: #0000FF",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "vertical",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.orientation.html string.quoted.double.html",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string.quoted.double.html: #0000FF",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string.quoted.double.html: #0000FF",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.orientation.html string.quoted.double.html punctuation.definition.string.end.html",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string.quoted.double.html: #0000FF",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string.quoted.double.html: #0000FF",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": ">",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.end.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "PascalCase",
+ "t": "text.html.markdown",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.begin.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "StackLayout",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative entity.name.tag.html",
+ "r": {
+ "dark_plus": "entity.name.tag: #569CD6",
+ "light_plus": "entity.name.tag: #800000",
+ "dark_vs": "entity.name.tag: #569CD6",
+ "light_vs": "entity.name.tag: #800000",
+ "hc_black": "entity.name.tag: #569CD6"
+ }
+ },
+ {
+ "c": ">",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.end.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "<",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.begin.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "WelcomeMessage",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative entity.name.tag.html",
+ "r": {
+ "dark_plus": "entity.name.tag: #569CD6",
+ "light_plus": "entity.name.tag: #800000",
+ "dark_vs": "entity.name.tag: #569CD6",
+ "light_vs": "entity.name.tag: #800000",
+ "hc_black": "entity.name.tag: #569CD6"
+ }
+ },
+ {
+ "c": " ",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "greetingText",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.greetingText.html entity.other.attribute-name.html",
+ "r": {
+ "dark_plus": "entity.other.attribute-name: #9CDCFE",
+ "light_plus": "entity.other.attribute-name: #FF0000",
+ "dark_vs": "entity.other.attribute-name: #9CDCFE",
+ "light_vs": "entity.other.attribute-name: #FF0000",
+ "hc_black": "entity.other.attribute-name: #9CDCFE"
+ }
+ },
+ {
+ "c": "=",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.greetingText.html punctuation.separator.key-value.html",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.greetingText.html string.quoted.double.html punctuation.definition.string.begin.html",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string.quoted.double.html: #0000FF",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string.quoted.double.html: #0000FF",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "hi",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.greetingText.html string.quoted.double.html",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string.quoted.double.html: #0000FF",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string.quoted.double.html: #0000FF",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": "\"",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative meta.attribute.unrecognized.greetingText.html string.quoted.double.html punctuation.definition.string.end.html",
+ "r": {
+ "dark_plus": "string: #CE9178",
+ "light_plus": "string.quoted.double.html: #0000FF",
+ "dark_vs": "string: #CE9178",
+ "light_vs": "string.quoted.double.html: #0000FF",
+ "hc_black": "string: #CE9178"
+ }
+ },
+ {
+ "c": " />",
+ "t": "text.html.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.end.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "text ",
+ "t": "text.html.markdown meta.paragraph.markdown",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "<",
+ "t": "text.html.markdown meta.paragraph.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.begin.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "RainbowAnimate",
+ "t": "text.html.markdown meta.paragraph.markdown meta.tag.other.unrecognized.html.derivative entity.name.tag.html",
+ "r": {
+ "dark_plus": "entity.name.tag: #569CD6",
+ "light_plus": "entity.name.tag: #800000",
+ "dark_vs": "entity.name.tag: #569CD6",
+ "light_vs": "entity.name.tag: #800000",
+ "hc_black": "entity.name.tag: #569CD6"
+ }
+ },
+ {
+ "c": ">",
+ "t": "text.html.markdown meta.paragraph.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.end.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "PascalCase",
+ "t": "text.html.markdown meta.paragraph.markdown",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ },
+ {
+ "c": "",
+ "t": "text.html.markdown meta.paragraph.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.begin.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": "RainbowAnimate",
+ "t": "text.html.markdown meta.paragraph.markdown meta.tag.other.unrecognized.html.derivative entity.name.tag.html",
+ "r": {
+ "dark_plus": "entity.name.tag: #569CD6",
+ "light_plus": "entity.name.tag: #800000",
+ "dark_vs": "entity.name.tag: #569CD6",
+ "light_vs": "entity.name.tag: #800000",
+ "hc_black": "entity.name.tag: #569CD6"
+ }
+ },
+ {
+ "c": ">",
+ "t": "text.html.markdown meta.paragraph.markdown meta.tag.other.unrecognized.html.derivative punctuation.definition.tag.end.html",
+ "r": {
+ "dark_plus": "punctuation.definition.tag: #808080",
+ "light_plus": "punctuation.definition.tag: #800000",
+ "dark_vs": "punctuation.definition.tag: #808080",
+ "light_vs": "punctuation.definition.tag: #800000",
+ "hc_black": "punctuation.definition.tag: #808080"
+ }
+ },
+ {
+ "c": " text",
+ "t": "text.html.markdown meta.paragraph.markdown",
+ "r": {
+ "dark_plus": "default: #D4D4D4",
+ "light_plus": "default: #000000",
+ "dark_vs": "default: #D4D4D4",
+ "light_vs": "default: #000000",
+ "hc_black": "default: #FFFFFF"
+ }
+ }
+]
\ No newline at end of file