[gtksourceview] html.lang: 2 spaces for the indentation



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">&lt;!--</property>
-      <property name="block-comment-end">--&gt;</property>
-    </metadata>
+  <metadata>
+    <property name="mimetypes">text/html</property>
+    <property name="globs">*.html;*.htm</property>
+    <property name="block-comment-start">&lt;!--</property>
+    <property name="block-comment-end">--&gt;</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>&lt;!--</start>
-            <end>--\s*&gt;</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>&lt;!--</start>
+      <end>--\s*&gt;</end>
+      <include>
+        <context ref="def:in-comment"/>
+      </include>
+    </context>
 
-        <context id="dtd" style-ref="dtd" class="no-spell-check">
-            <start>&lt;!</start>
-            <end>&gt;</end>
-        </context>
+    <context id="dtd" style-ref="dtd" class="no-spell-check">
+      <start>&lt;!</start>
+      <end>&gt;</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>&lt;title&gt;</start>
-                    <end>&lt;/title&gt;</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>&lt;\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>&gt;</start>
-                            <end>&lt;\s*/h1\s*&gt;</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>&lt;\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>&gt;</start>
-                            <end>&lt;\s*/h2\s*&gt;</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>&lt;\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>&gt;</start>
-                            <end>&lt;\s*/h3\s*&gt;</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>&lt;\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>&gt;</start>
-                            <end>&lt;\s*/h4\s*&gt;</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>&lt;\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>&gt;</start>
-                            <end>&lt;\s*/h5\s*&gt;</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>&lt;title&gt;</start>
+          <end>&lt;/title&gt;</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>(?=&gt;|\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>&lt;\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>&gt;</start>
+              <end>&lt;\s*/h1\s*&gt;</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>&lt;\s*style\%]</start>
-            <end>/&gt;|&lt;\s*/\s*style\s*&gt;</end>
-
-            <include>
+        <context id="h2" end-at-line-end="true">
+          <start>&lt;\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>&gt;</start>
+              <end>&lt;\s*/h2\s*&gt;</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>&gt;</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>&lt;\s*script\%]</start>
-            <end>/&gt;|&lt;\s*/\s*script\s*&gt;</end>
-
-            <include>
+        <context id="h3" end-at-line-end="true">
+          <start>&lt;\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>&gt;</start>
+              <end>&lt;\s*/h3\s*&gt;</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>&gt;</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>&lt;\s*/?\s*[a-z0-9_-]+</start>
-            <end>/?\s*&gt;</end>
-            <include>
+        <context id="h4" end-at-line-end="true">
+          <start>&lt;\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>&gt;</start>
+              <end>&lt;\s*/h4\s*&gt;</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>&lt;\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>&gt;</start>
+              <end>&lt;\s*/h5\s*&gt;</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>(?=&gt;|\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>&lt;\s*style\%]</start>
+      <end>/&gt;|&lt;\s*/\s*style\s*&gt;</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>&gt;</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>&lt;\s*script\%]</start>
+      <end>/&gt;|&lt;\s*/\s*script\s*&gt;</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>&gt;</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>&lt;\s*/?\s*[a-z0-9_-]+</start>
+      <end>/?\s*&gt;</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]