[gtksourceview] html.lang: Enhance <title> highlighting
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] html.lang: Enhance <title> highlighting
- Date: Mon, 26 Nov 2018 23:21:27 +0000 (UTC)
commit 048ba1dde88e734151c10971343a14a96701aef3
Author: Jeffery To <jeffery to gmail com>
Date: Mon Oct 15 03:53:56 2018 +0800
html.lang: Enhance <title> highlighting
* Allow title to span multiple lines
* Allow title tag to contain attributes (lang is probably the only
useful attribute here), spaces after tag name
data/language-specs/html.lang | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index ceda5d74..30145c2a 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -90,13 +90,21 @@
<context id="headings">
<include>
- <context id="title" style-inside="true" style-ref="title" end-at-line-end="true">
- <start><title></start>
- <end></title></end>
+ <context id="title" class="no-spell-check">
+ <start><title\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <context ref="embedded-lang-hook"/>
+ <context ref="generic-tag"/>
+
+ <context style-inside="true" style-ref="title" end-parent="true" class-disabled="no-spell-check">
+ <start>></start>
+ <end></title\s*></end>
+ <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>
</include>
</context>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]