]> gitweb.factorcode.org Git - factor.git/blobdiff - misc/atom/grammars/html (factor).cson
misc/atom: adding an Atom bundle for syntax highlighting.
[factor.git] / misc / atom / grammars / html (factor).cson
diff --git a/misc/atom/grammars/html (factor).cson b/misc/atom/grammars/html (factor).cson
new file mode 100644 (file)
index 0000000..21b0b1a
--- /dev/null
@@ -0,0 +1,35 @@
+fileTypes: [
+  "furnace"
+  "fhtml"
+]
+foldingStartMarker: '''
+  (?x)
+               (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\\b.*?>
+               |<!--(?!.*-->)
+               |\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))
+               )
+'''
+foldingStopMarker: '''
+  (?x)
+               (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>
+               |^\\s*-->
+               |(^|\\s)\\}
+               )
+'''
+name: "HTML (Factor)"
+patterns: [
+  {
+    begin: "<%\\s"
+    end: "(?<=\\s)%>"
+    name: "source.factor.embedded.html"
+    patterns: [
+      {
+        include: "source.factor"
+      }
+    ]
+  }
+  {
+    include: "text.html.basic"
+  }
+]
+scopeName: "text.html.factor"