[gtksourceview] html.lang: 2 spaces for the indentation
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] html.lang: 2 spaces for the indentation
- Date: Wed, 5 Feb 2014 17:27:56 +0000 (UTC)
commit 6dee72a175c5d97b589244d252911e55b19083db
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Feb 5 18:26:55 2014 +0100
html.lang: 2 spaces for the indentation
data/language-specs/html.lang | 461 ++++++++++++++++++++---------------------
1 files changed, 229 insertions(+), 232 deletions(-)
---
diff --git a/data/language-specs/html.lang b/data/language-specs/html.lang
index 8d98b2b..ee1dc3f 100644
--- a/data/language-specs/html.lang
+++ b/data/language-specs/html.lang
@@ -23,258 +23,255 @@
-->
<language id="html" _name="HTML" version="2.0" _section="Markup">
- <metadata>
- <property name="mimetypes">text/html</property>
- <property name="globs">*.html;*.htm</property>
- <property name="block-comment-start"><!--</property>
- <property name="block-comment-end">--></property>
- </metadata>
+ <metadata>
+ <property name="mimetypes">text/html</property>
+ <property name="globs">*.html;*.htm</property>
+ <property name="block-comment-start"><!--</property>
+ <property name="block-comment-end">--></property>
+ </metadata>
- <styles>
- <style id="comment" _name="Comment" map-to="xml:comment"/>
- <style id="tag" _name="Tag" map-to="xml:element-name"/>
- <style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
- <style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
- <style id="dtd" _name="DTD" map-to="xml:doctype"/>
- <style id="error" _name="Error" map-to="xml:error"/>
- <style id="title" _name="Page title" map-to="def:heading0"/>
- <style id="h1" _name="Heading level 1" map-to="def:heading1"/>
- <style id="h2" _name="Heading level 2" map-to="def:heading2"/>
- <style id="h3" _name="Heading level 3" map-to="def:heading3"/>
- <style id="h4" _name="Heading level 4" map-to="def:heading4"/>
- <style id="h5" _name="Heading level 5" map-to="def:heading5"/>
- </styles>
+ <styles>
+ <style id="comment" _name="Comment" map-to="xml:comment"/>
+ <style id="tag" _name="Tag" map-to="xml:element-name"/>
+ <style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
+ <style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
+ <style id="dtd" _name="DTD" map-to="xml:doctype"/>
+ <style id="error" _name="Error" map-to="xml:error"/>
+ <style id="title" _name="Page title" map-to="def:heading0"/>
+ <style id="h1" _name="Heading level 1" map-to="def:heading1"/>
+ <style id="h2" _name="Heading level 2" map-to="def:heading2"/>
+ <style id="h3" _name="Heading level 3" map-to="def:heading3"/>
+ <style id="h4" _name="Heading level 4" map-to="def:heading4"/>
+ <style id="h5" _name="Heading level 5" map-to="def:heading5"/>
+ </styles>
- <default-regex-options case-sensitive="false"/>
+ <default-regex-options case-sensitive="false"/>
- <definitions>
- <!-- Html comments are more permissive than xml comments -->
- <context id="comment" style-ref="comment" class="comment">
- <start><!--</start>
- <end>--\s*></end>
- <include>
- <context ref="def:in-comment"/>
- </include>
- </context>
+ <definitions>
+ <!-- Html comments are more permissive than xml comments -->
+ <context id="comment" style-ref="comment" class="comment">
+ <start><!--</start>
+ <end>--\s*></end>
+ <include>
+ <context ref="def:in-comment"/>
+ </include>
+ </context>
- <context id="dtd" style-ref="dtd" class="no-spell-check">
- <start><!</start>
- <end>></end>
- </context>
+ <context id="dtd" style-ref="dtd" class="no-spell-check">
+ <start><!</start>
+ <end>></end>
+ </context>
- <!-- This is a placeholder context intended to be <replace>d
- in languages like php that need to embedd contexts inside
- html tags and attributes.
- -->
- <context id="embedded-lang-hook">
- <start>\%{def:never-match}</start>
- <end></end>
- </context>
+ <!-- This is a placeholder context intended to be <replace>d
+ in languages like php that need to embedd contexts inside
+ html tags and attributes.
+ -->
+ <context id="embedded-lang-hook">
+ <start>\%{def:never-match}</start>
+ <end></end>
+ </context>
- <context id="headings">
- <include>
- <context id="title" style-inside="true" style-ref="title" end-at-line-end="true">
- <start><title></start>
- <end></title></end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- </include>
- </context>
- <context id="h1" end-at-line-end="true">
- <start><\s*h1</start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="h1-inside" style-inside="true" style-ref="h1" end-at-line-end="true"
end-parent="true">
- <start>></start>
- <end><\s*/h1\s*></end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <!-- We cannot match any further here, because matching to tag will override
our end-match -->
- </include>
- </context>
- </include>
- </context>
- <context id="h2" end-at-line-end="true">
- <start><\s*h2</start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="h2-inside" style-inside="true" style-ref="h2" end-at-line-end="true"
end-parent="true">
- <start>></start>
- <end><\s*/h2\s*></end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <!-- We cannot match any further here, because matching to tag will override
our end-match -->
- </include>
- </context>
- </include>
- </context>
- <context id="h3" end-at-line-end="true">
- <start><\s*h3</start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="h3-inside" style-inside="true" style-ref="h3" end-at-line-end="true"
end-parent="true">
- <start>></start>
- <end><\s*/h3\s*></end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <!-- We cannot match any further here, because matching to tag will override
our end-match -->
- </include>
- </context>
- </include>
- </context>
- <context id="h4" end-at-line-end="true">
- <start><\s*h4</start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="h4-inside" style-inside="true" style-ref="h4" end-at-line-end="true"
end-parent="true">
- <start>></start>
- <end><\s*/h4\s*></end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <!-- We cannot match any further here, because matching to tag will override
our end-match -->
- </include>
- </context>
- </include>
- </context>
- <context id="h5" end-at-line-end="true">
- <start><\s*h5</start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="h5-inside" style-inside="true" style-ref="h5" end-at-line-end="true"
end-parent="true">
- <start>></start>
- <end><\s*/h5\s*></end>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context sub-pattern="0" where="end" style-ref="tag"/>
- <!-- We cannot match any further here, because matching to tag will override
our end-match -->
- </include>
- </context>
- </include>
- </context>
- </include>
+ <context id="headings">
+ <include>
+ <context id="title" style-inside="true" style-ref="title" end-at-line-end="true">
+ <start><title></start>
+ <end></title></end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ </include>
</context>
-
- <context id="generic-tag">
- <include>
-
- <!-- Attribute in the form: name="value" -->
- <context id="attrib-quoted" style-ref="attrib-name" class="no-spell-check">
- <start extended="true">
- [A-Za-z0-9:_-]+ # attribute name
- \s*=\s* # "="
- (\") # string beginning
- </start>
- <end>\"</end>
- <include>
- <context sub-pattern="1" where="start" style-ref="attrib-value"/>
- <context sub-pattern="0" where="end" style-ref="attrib-value"/>
- <context id="string" extend-parent="false" end-at-line-end="true"
style-ref="attrib-value" class="string" class-disabled="no-spell-check">
- <start>\%{def:always-match}</start>
- <include>
- <context ref="xml:entity"/>
- <context ref="xml:character-reference"/>
- <context ref="embedded-lang-hook"/>
- </include>
- </context>
- </include>
- </context>
-
- <!-- Attribute in the form: name=value -->
- <context id="attrib-unquoted" style-ref="attrib-value" class="no-spell-check">
- <start extended="true">
- [a-z0-9:_-]+ # attribute name
- \s*=\s* # "="
- </start>
- <end>(?=>|\s)</end>
- <include>
- <context sub-pattern="0" where="start" style-ref="attrib-name"/>
- <context ref="xml:entity"/>
- <context ref="xml:character-reference"/>
- </include>
- </context>
-
- <!-- Attribute in the form: name -->
- <context id="attrib-no-value" style-ref="attrib-name" class="no-spell-check">
- <match extended="true">
- [a-z0-9:_-]+ # attribute name
- </match>
- </context>
-
- <context ref="embedded-lang-hook"/>
-
- </include>
+ <context id="h1" end-at-line-end="true">
+ <start><\s*h1</start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="h1-inside" style-inside="true" style-ref="h1" end-at-line-end="true"
end-parent="true">
+ <start>></start>
+ <end><\s*/h1\s*></end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ <!-- We cannot match any further here, because matching to tag will override our end-match
-->
+ </include>
+ </context>
+ </include>
</context>
-
- <context id="style" class="no-spell-check">
- <start><\s*style\%]</start>
- <end>/>|<\s*/\s*style\s*></end>
-
- <include>
+ <context id="h2" end-at-line-end="true">
+ <start><\s*h2</start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="h2-inside" style-inside="true" style-ref="h2" end-at-line-end="true"
end-parent="true">
+ <start>></start>
+ <end><\s*/h2\s*></end>
+ <include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="style-code" extend-parent="false">
- <start>></start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="css:css"/>
- </include>
- </context>
- </include>
+ <!-- We cannot match any further here, because matching to tag will override our end-match
-->
+ </include>
+ </context>
+ </include>
</context>
-
- <context id="script" class="no-spell-check">
- <start><\s*script\%]</start>
- <end>/>|<\s*/\s*script\s*></end>
-
- <include>
+ <context id="h3" end-at-line-end="true">
+ <start><\s*h3</start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="h3-inside" style-inside="true" style-ref="h3" end-at-line-end="true"
end-parent="true">
+ <start>></start>
+ <end><\s*/h3\s*></end>
+ <include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
- <context ref="generic-tag"/>
- <context id="js-code" extend-parent="false">
- <start>></start>
- <include>
- <context sub-pattern="0" where="start" style-ref="tag"/>
- <context ref="js:js"/>
- </include>
- </context>
- </include>
+ <!-- We cannot match any further here, because matching to tag will override our end-match
-->
+ </include>
+ </context>
+ </include>
</context>
-
- <context id="tag" class="no-spell-check">
- <start><\s*/?\s*[a-z0-9_-]+</start>
- <end>/?\s*></end>
- <include>
+ <context id="h4" end-at-line-end="true">
+ <start><\s*h4</start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="h4-inside" style-inside="true" style-ref="h4" end-at-line-end="true"
end-parent="true">
+ <start>></start>
+ <end><\s*/h4\s*></end>
+ <include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
- <context ref="generic-tag"/>
- </include>
+ <!-- We cannot match any further here, because matching to tag will override our end-match
-->
+ </include>
+ </context>
+ </include>
</context>
+ <context id="h5" end-at-line-end="true">
+ <start><\s*h5</start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="h5-inside" style-inside="true" style-ref="h5" end-at-line-end="true"
end-parent="true">
+ <start>></start>
+ <end><\s*/h5\s*></end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ <!-- We cannot match any further here, because matching to tag will override our end-match
-->
+ </include>
+ </context>
+ </include>
+ </context>
+ </include>
+ </context>
- <context id="html">
- <include>
- <context ref="xml:doctype"/>
+ <context id="generic-tag">
+ <include>
+ <!-- Attribute in the form: name="value" -->
+ <context id="attrib-quoted" style-ref="attrib-name" class="no-spell-check">
+ <start extended="true">
+ [A-Za-z0-9:_-]+ # attribute name
+ \s*=\s* # "="
+ (\") # string beginning
+ </start>
+ <end>\"</end>
+ <include>
+ <context sub-pattern="1" where="start" style-ref="attrib-value"/>
+ <context sub-pattern="0" where="end" style-ref="attrib-value"/>
+ <context id="string" extend-parent="false" end-at-line-end="true" style-ref="attrib-value"
class="string" class-disabled="no-spell-check">
+ <start>\%{def:always-match}</start>
+ <include>
<context ref="xml:entity"/>
<context ref="xml:character-reference"/>
- <context ref="xml:cdata"/>
- <context ref="comment"/>
- <context ref="dtd"/>
- <context ref="headings"/>
- <context ref="style"/>
- <context ref="script"/>
- <context ref="tag"/>
- </include>
+ <context ref="embedded-lang-hook"/>
+ </include>
+ </context>
+ </include>
+ </context>
+
+ <!-- Attribute in the form: name=value -->
+ <context id="attrib-unquoted" style-ref="attrib-value" class="no-spell-check">
+ <start extended="true">
+ [a-z0-9:_-]+ # attribute name
+ \s*=\s* # "="
+ </start>
+ <end>(?=>|\s)</end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="attrib-name"/>
+ <context ref="xml:entity"/>
+ <context ref="xml:character-reference"/>
+ </include>
+ </context>
+
+ <!-- Attribute in the form: name -->
+ <context id="attrib-no-value" style-ref="attrib-name" class="no-spell-check">
+ <match extended="true">
+ [a-z0-9:_-]+ # attribute name
+ </match>
</context>
- </definitions>
+ <context ref="embedded-lang-hook"/>
+ </include>
+ </context>
+
+ <context id="style" class="no-spell-check">
+ <start><\s*style\%]</start>
+ <end>/>|<\s*/\s*style\s*></end>
+
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="style-code" extend-parent="false">
+ <start>></start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="css:css"/>
+ </include>
+ </context>
+ </include>
+ </context>
+
+ <context id="script" class="no-spell-check">
+ <start><\s*script\%]</start>
+ <end>/>|<\s*/\s*script\s*></end>
+
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ <context id="js-code" extend-parent="false">
+ <start>></start>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context ref="js:js"/>
+ </include>
+ </context>
+ </include>
+ </context>
+
+ <context id="tag" class="no-spell-check">
+ <start><\s*/?\s*[a-z0-9_-]+</start>
+ <end>/?\s*></end>
+ <include>
+ <context sub-pattern="0" where="start" style-ref="tag"/>
+ <context sub-pattern="0" where="end" style-ref="tag"/>
+ <context ref="generic-tag"/>
+ </include>
+ </context>
+
+ <context id="html">
+ <include>
+ <context ref="xml:doctype"/>
+ <context ref="xml:entity"/>
+ <context ref="xml:character-reference"/>
+ <context ref="xml:cdata"/>
+ <context ref="comment"/>
+ <context ref="dtd"/>
+ <context ref="headings"/>
+ <context ref="style"/>
+ <context ref="script"/>
+ <context ref="tag"/>
+ </include>
+ </context>
+ </definitions>
</language>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]