[gtksourceview] Add jade template lang spec
- From: Seán de Búrca <sdeburca src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Add jade template lang spec
- Date: Sun, 19 Apr 2015 16:33:35 +0000 (UTC)
commit f81933b01994c6b953876db359dea6500ecc6b75
Author: Seán de Búrca <leftmostcat gmail com>
Date: Sat Apr 18 13:51:20 2015 -0600
Add jade template lang spec
data/language-specs/Makefile.am | 1 +
data/language-specs/jade.lang | 250 +++++++++++++++++++++++++++++++++++++++
po/POTFILES.in | 1 +
3 files changed, 252 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/Makefile.am b/data/language-specs/Makefile.am
index 27dba3c..c04ec22 100644
--- a/data/language-specs/Makefile.am
+++ b/data/language-specs/Makefile.am
@@ -53,6 +53,7 @@ LANGUAGES = \
imagej.lang \
ini.lang \
j.lang \
+ jade.lang \
java.lang \
javascript.lang \
json.lang \
diff --git a/data/language-specs/jade.lang b/data/language-specs/jade.lang
new file mode 100644
index 0000000..d225a10
--- /dev/null
+++ b/data/language-specs/jade.lang
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This file is part of GtkSourceView
+
+ Author: Remy Loubradou <remy loubradou gmail com>
+ Copyright (C) 2011 Remy Loubradou <remy loubradou gmail com>
+ Copyright (C) 2015 Seán de Búrca <leftmostcat gmail com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+-->
+<language id="jade" _name="Jade" version="2.0" _section="Markup">
+ <metadata>
+ <property name="globs">*.jade</property>
+ <property name="line-comment-start">//</property>
+ </metadata>
+
+ <styles>
+ <style id="comment" _name="Comment" map-to="def:comment"/>
+ <style id="doctype" _name="DOCTYPE" map-to="def:preprocessor"/>
+ <style id="processing-instruction" _name="Processing instruction" map-to="def:preprocessor"/>
+ <style id="element-name" _name="Element name" map-to="def:identifier"/>
+ <style id="attribute-name" _name="Attribute name" map-to="def:type"/>
+ <style id="attribute-value" _name="Attribute value" map-to="def:string"/>
+ <style id="tags" _name="Tags" map-to="def:keyword"/>
+ <style id="entity" _name="Entity" map-to="def:preprocessor"/>
+ <style id="error" _name="Error" map-to="def:error"/>
+ </styles>
+
+ <definitions>
+ <define-regex id="name">[a-zA-Z0-9_-]+</define-regex>
+
+ <context id="doctype" style-ref="doctype">
+ <match>^(!!!)\s*([a-zA-Z0-9-_]+)</match>
+ </context>
+
+ <context id="attribute-name" class="no-spell-check">
+ <match>(\b\%{name}\s*) *=</match>
+ <include>
+ <context sub-pattern="1" style-ref="attribute-name"/>
+ </include>
+ </context>
+
+ <context id="entity" style-ref="entity" class="no-spell-check">
+ <match>&\%{name};</match>
+ </context>
+
+ <context id="character-reference" style-ref="entity">
+ <match>&#([0-9]+|x[a-fA-F0-9]+);</match>
+ </context>
+
+ <context id="unallowed-chars" style-ref="error" extend-parent="false">
+ <match>[&<]</match>
+ </context>
+
+ <context id="attribute-value" style-ref="attribute-value" class="string" class-disabled="no-spell-check">
+ <start>["']</start>
+ <end>\%{0 start}</end>
+ <include>
+ <context ref="entity"/>
+ <context ref="character-reference"/>
+ <context ref="unallowed-chars"/>
+ </include>
+ </context>
+
+ <context id="attributes">
+ <start>\(</start>
+ <end>\)</end>
+ <include>
+ <context style-ref="error" extend-parent="false">
+ <match>"[^"]+" *[a-zA-Z0-9_-]+</match>
+ </context>
+ <context ref="attribute-name"/>
+ <context ref="attribute-value"/>
+ </include>
+ </context>
+
+ <context id="tags">
+ <match extended="true">
+ ^\s*\b
+ (
+ a|
+ abbr|
+ acronym|
+ address|
+ area|
+ article|
+ aside|
+ audio|
+ b|
+ base|
+ big|
+ blockquote|
+ body|
+ br|
+ button|
+ canvas|
+ caption|
+ cite|
+ code|
+ col|
+ colgroup|
+ dd|
+ del|
+ details|
+ dfn|
+ div|
+ dl|
+ dt|
+ em|
+ fieldset|
+ figcaption|
+ figure|
+ footer|
+ form|
+ frame|
+ frameset|
+ h1|
+ h2|
+ h3|
+ h4|
+ h5|
+ h6|
+ head|
+ header|
+ hgroup|
+ hr|
+ html|
+ i|
+ iframe|
+ img|
+ input|
+ ins|
+ kbd|
+ label|
+ legend|
+ li|
+ link|
+ map|
+ mark|
+ menu|
+ meta|
+ nav|
+ noframes|
+ noscript|
+ object|
+ ol|
+ optgroup|
+ option|
+ p|
+ param|
+ pre|
+ q|
+ samp|
+ script|
+ section|
+ select|
+ small|
+ span|
+ strike|
+ strong|
+ style|
+ sub|
+ summary|
+ sup|
+ table|
+ tbody|
+ td|
+ textarea|
+ tfoot|
+ th|
+ thead|
+ time|
+ title|
+ tr|
+ tt|
+ ul|
+ var|
+ var_keys|
+ video
+ )
+ \s*\b[\?!:]{0,1}
+ </match>
+ <include>
+ <context sub-pattern="1" style-ref="tags"/>
+ </include>
+ </context>
+
+ <context id="attribute-id" style-ref="attribute-name">
+ <match>#[a-zA-Z0-9_-]+</match>
+ </context>
+
+ <context id="attribute-class" style-ref="attribute-name">
+ <match>\.[a-zA-Z0-9_-]+</match>
+ </context>
+
+ <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment"
class-disabled="no-spell-check">
+ <start>//</start>
+ <include>
+ <context ref="def:in-line-comment"/>
+ </include>
+ </context>
+
+ <context id="jade-executable">
+ <start>^\s*(-)</start>
+ <end>$</end>
+ </context>
+
+ <context id="interpolated">
+ <start>[^\\](#\{)</start>
+ <end>[^\}]+\}</end>
+ <include>
+ <context sub-pattern="1" where="start" style-ref="processing-instruction"/>
+ <context sub-pattern="0" where="end" style-ref="processing-instruction"/>
+ </include>
+ </context>
+
+ <context id="jade-filter" style-ref="processing-instruction">
+ <match>^\s*\:[^$]+$</match>
+ </context>
+
+ <context id="jade" class="no-spell-check">
+ <include>
+ <context ref="doctype"/>
+ <context ref="attributes"/>
+ <context ref="attribute-id"/>
+ <context ref="attribute-class"/>
+ <context ref="tags"/>
+ <context ref="line-comment"/>
+ <context ref="jade-executable"/>
+ <context ref="interpolated" />
+ <context ref="jade-filter"/>
+ </include>
+ </context>
+ </definitions>
+</language>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b1e9958..3a43689 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -50,6 +50,7 @@ data/language-specs/idl-exelis.lang
data/language-specs/idl.lang
data/language-specs/imagej.lang
data/language-specs/ini.lang
+data/language-specs/jade.lang
data/language-specs/java.lang
data/language-specs/javascript.lang
data/language-specs/j.lang
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]