summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Schönberg <tobias47n9e@gmail.com>2015-09-12 22:34:01 +0200
committerSĂ©bastien Wilmet <swilmet@gnome.org>2015-10-01 18:00:28 +0200
commit932f9cbdd029dd34aa74d943e3dd9a32129518ff (patch)
treea7c23f2e0008f6a78d26d40501ba44771bb1a529
parent78f67beab916a688541b70870f38d670a4c056e1 (diff)
downloadgtksourceview-932f9cbdd029dd34aa74d943e3dd9a32129518ff.tar.gz
html: adding embedded-lang-hook context to headings-contexts
Languages embedded im html, whos highlighting is inherited from html.lang are not hightlighted between the headings-contexts (<title>, <h1>, ...). This prevents the reader to properly recognize code that is used to customize the title or headings. For example the Django Template Language is often used between the <title> tags to customize the title. If the '{{' and '}}' brackets are not highlighted the reader interprets the section as text instead of the embedded language. The patch adds the <context ref="embedded-lang-hook"/> to the headings-contexts to fix this. https://bugzilla.gnome.org/show_bug.cgi?id=754934
-rw-r--r--data/language-specs/html.lang6
1 files changed, 6 insertions, 0 deletions
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index 58bf0627..74ab6ebe 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -79,6 +79,7 @@
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="embedded-lang-hook"/>
</include>
</context>
<context id="h1" end-at-line-end="true">
@@ -92,6 +93,7 @@
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="embedded-lang-hook"/>
<!-- We cannot match any further here, because matching to tag will override our end-match -->
</include>
</context>
@@ -108,6 +110,7 @@
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="embedded-lang-hook"/>
<!-- We cannot match any further here, because matching to tag will override our end-match -->
</include>
</context>
@@ -124,6 +127,7 @@
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="embedded-lang-hook"/>
<!-- We cannot match any further here, because matching to tag will override our end-match -->
</include>
</context>
@@ -140,6 +144,7 @@
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="embedded-lang-hook"/>
<!-- We cannot match any further here, because matching to tag will override our end-match -->
</include>
</context>
@@ -156,6 +161,7 @@
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="embedded-lang-hook"/>
<!-- We cannot match any further here, because matching to tag will override our end-match -->
</include>
</context>