aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmihica <smihica@gmail.com>2013-05-18 19:31:37 +0900
committersmihica <smihica@gmail.com>2013-05-18 19:31:37 +0900
commit25be320fb32069cc47da17f0e5f8b4f0e2b7b14e (patch)
tree6eeb8046301848c570eb5fa1df785d87122b45b5
parent4bbdc0f091446bd56dc105429e6d7118a59b2805 (diff)
parent7f54183d1f9b4a610a581342fe68f4b2f09f483a (diff)
downloademmet-mode-25be320fb32069cc47da17f0e5f8b4f0e2b7b14e.tar.lz
emmet-mode-25be320fb32069cc47da17f0e5f8b4f0e2b7b14e.tar.xz
emmet-mode-25be320fb32069cc47da17f0e5f8b4f0e2b7b14e.zip
Merge branch 'emmet'
-rw-r--r--.gitignore1
-rw-r--r--LICENSE48
-rw-r--r--Makefile33
-rw-r--r--README.md386
-rw-r--r--conf/preferences.json372
-rw-r--r--conf/snippets.json717
-rw-r--r--src/comments.el62
-rw-r--r--src/css-abbrev.el268
-rw-r--r--src/html-abbrev.el660
-rw-r--r--src/init.el76
-rw-r--r--src/mode-def.el296
-rw-r--r--src/preferences.el1548
-rw-r--r--src/snippets.el698
-rw-r--r--src/test.el540
-rwxr-xr-xtools/json2hash92
-rw-r--r--zencoding-mode.el3244
-rw-r--r--zencoding-trie.nw170
17 files changed, 8409 insertions, 802 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f5711cb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+memo* \ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a36179e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,48 @@
+- /zencoding-mode.el
+
+ Copyright (C) 2009, Chris Done
+
+ Version: 0.5.1
+ Author: Chris Done <chrisdone@gmail.com>
+ URL: https://github.com/rooney/zencoding
+ Last-Updated: 2011-12-31 Sat
+ Keywords: convenience
+
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This file 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNU Emacs; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+- /conf/snippets.json
+- /conf/preferences.json
+
+ original [ https://github.com/emmetio/emmet ]
+
+ Copyright (c) 2012 Sergey Chikuyonok <serge.che@gmail.com>
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in the
+ Software without restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+ Software, and to permit persons to whom the Software is furnished to do so,
+ subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Makefile b/Makefile
index 719e498..28ef0b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,31 @@
-all:
- notangle -Rzencoding-trie.el zencoding-trie.nw > zencoding-trie.el
+DST=zencoding-mode.el
+
+all: zencoding-mode.el
+
+zencoding-mode.el: src/snippets.el src/preferences.el src/*
+ rm -f $(DST)
+ touch $(DST)
+ cat src/comments.el >> $(DST)
+ cat src/init.el >> $(DST)
+ cat src/snippets.el >> $(DST)
+ cat src/preferences.el >> $(DST)
+ cat src/html-abbrev.el >> $(DST)
+ cat src/css-abbrev.el >> $(DST)
+ cat src/mode-def.el >> $(DST)
+
+src/snippets.el: conf/snippets.json
+ tools/json2hash conf/snippets.json -o src/snippets.el --defvar 'zencoding-snippets'
+
+src/preferences.el: conf/preferences.json
+ tools/json2hash conf/preferences.json -o src/preferences.el --defvar 'zencoding-preferences'
+
+clean:
+ rm -f zencoding-mode.el src/snippets.el src/preferences.el
+
+test:
+ /usr/bin/env emacs --script src/test.el
docs:
- noweave -latex zencoding-trie.nw > zencoding-trie.latex
- pdflatex zencoding-trie.latex \ No newline at end of file
+ echo docs
+
+.PHONY: all test docs clean \ No newline at end of file
diff --git a/README.md b/README.md
index a34141c..0298172 100644
--- a/README.md
+++ b/README.md
@@ -1,61 +1,53 @@
-# About Zencoding
-[Description
-here](http://www.456bereastreet.com/archive/200909/write_html_and_css_quicker_with_with_zen_coding/)
-and [here](http://mondaybynoon.com/2009/08/17/the-art-of-zen-coding-bringing-snippets-to-a-new-level/).
+__This is a fork of [zencoding-mode](https://github.com/rooney/zencoding) to support [Emmet](http://emmet.io/)'s feature.__
-I’ll quote the blog:
+## About zencoding-mode
-> zen-coding includes an entirely new angle to writing markup, and it
-> facilitates the feature by letting you write HTML based on CSS
-> selectors. It’s so simple it’s confusing at first. I think it’s best
-> explained by doing a quick before and after. If you were to type:
+[zencoding-mode](https://github.com/rooney/zencoding) is a minor mode providing support for Zen Coding by producing HTML from CSS-like selectors. See [README](https://github.com/rooney/zencoding/blob/master/README.md)
- div#name.one.two
+## About Emmet
+Zen Coding has been renamed to [Emmet](http://emmet.io/) and includes an expanded feature set.
-> and follow that with the zen-coding plugin keystroke (CMD+E in
- TextMate), the plugin will reformat the line as:
+## Abbreviation Examples
- <div id="name" class="one two"></div>
+- [HTML abbreviations](https://github.com/smihica/zencoding#html-abbreviations)
+- [CSS abbreviations](https://github.com/smihica/zencoding#css-abbreviations)
-See the [EmacsWiki for more background on this mode.](http://www.emacswiki.org/emacs/ZenCoding)
-
-# Screenshots and videos
-
-* ![Picture of zencoding in action](http://img703.imageshack.us/img703/4474/zencodingmode.png)
-
-* [YouTube video](http://www.youtube.com/watch?v=u2r8JfJJgy8)
-
-# Installation
+## Installation
Just make sure zencoding-mode.el is in your `load-path`, if you
extracted zencoding-mode to a directory:
- (add-to-list "~/emacs.d/zencoding-mode")
+ (add-to-list 'load-path "~/emacs.d/zencoding-mode")
And then just require as normal:
(require 'zencoding-mode)
-# Usage
+## Usage
Enable it by running `M-x zencoding-mode`. You probably want to add it
to auto-load on your sgml modes:
(add-hook 'sgml-mode-hook 'zencoding-mode) ;; Auto-start on any markup modes
+ (add-hook 'css-mode-hook 'zencoding-mode) ;; enable Emmet's css abbreviation.
+
+And you can set default indent depth of HTML abbreviation.
+
+ (add-hook 'zencoding-mode-hook (lambda () (setq zencoding-indentation 2))) ;indent 2 spaces.
-Good to go: place point in a zencoding snippet and press C-j to expand it (or
+Good to go: place point in a zencoding snippet and press C-j to expand it (or
alternatively, alias your preferred keystroke to M-x zencoding-expand-line) and
-you'll transform your snippet into the appropriate tag structure.
+you'll transform your snippet into the appropriate tag structure.
-# Examples
+## HTML abbreviations
-## Basic tags
+#### Basic tags
- a <a></a>
- a.x <a class="x"></a>
- a#q.x <a id="q" class="x"></a>
- a#q.x.y.z <a id="q" class="x y z"></a>
+ a <a href=""></a>
+ a.x <a class="x" href=""></a>
+ a#q.x <a id="q" class="x" href=""></a>
+ a#q.x.y.z <a id="q" class="x y z" href=""></a>
#q <div id="q">
</div>
.x <div class="x">
@@ -65,39 +57,39 @@ you'll transform your snippet into the appropriate tag structure.
#q.x.y.z <div id="q" class="x y z">
</div>
-## Empty tags
+#### Empty tags
- a/ <a/>
- a/.x <a class="x"/>
- a/#q.x <a id="q" class="x"/>
- a/#q.x.y.z <a id="q" class="x y z"/>
+ a/ <a href=""/>
+ a/.x <a class="x" href=""/>
+ a/#q.x <a id="q" class="x" href=""/>
+ a/#q.x.y.z <a id="q" class="x y z" href=""/>
-## Self-closing tags
+#### Self-closing tags
- input type=text <input type="text"/>
- img <img/>
- img>metadata/*2 <img>
+ input type=text <input type="text" name="" value=""/>
+ img <img src="" alt=""/>
+ img>metadata/*2 <img src="" alt="">
<metadata/>
<metadata/>
</img>
-## Siblings
+#### Siblings
- a+b <a></a>
+ a+b <a href=""></a>
<b></b>
- a+b+c <a></a>
+ a+b+c <a href=""></a>
<b></b>
<c></c>
- a.x+b <a class="x"></a>
+ a.x+b <a class="x" href=""></a>
<b></b>
- a#q.x+b <a id="q" class="x"></a>
+ a#q.x+b <a id="q" class="x" href=""></a>
<b></b>
- a#q.x.y.z+b <a id="q" class="x y z"></a>
+ a#q.x.y.z+b <a id="q" class="x y z" href=""></a>
<b></b>
- a#q.x.y.z+b#p.l.m.n <a id="q" class="x y z"></a>
+ a#q.x.y.z+b#p.l.m.n <a id="q" class="x y z" href=""></a>
<b id="p" class="l m n"></b>
-## Tag expansion
+#### Tag expansion
table+ <table>
<tr>
@@ -122,70 +114,70 @@ you'll transform your snippet into the appropriate tag structure.
<li></li>
</ul>
-## Parent > child
+#### Parent > child
- a>b <a><b></b></a>
- a>b>c <a><b><c></c></b></a>
- a.x>b <a class="x"><b></b></a>
- a#q.x>b <a id="q" class="x"><b></b></a>
- a#q.x.y.z>b <a id="q" class="x y z"><b></b></a>
- a#q.x.y.z>b#p.l.m.n <a id="q" class="x y z"><b id="p" class="l m n"></b></a>
+ a>b <a href=""><b></b></a>
+ a>b>c <a href=""><b><c></c></b></a>
+ a.x>b <a class="x" href=""><b></b></a>
+ a#q.x>b <a id="q" class="x" href=""><b></b></a>
+ a#q.x.y.z>b <a id="q" class="x y z" href=""><b></b></a>
+ a#q.x.y.z>b#p.l.m.n <a id="q" class="x y z" href=""><b id="p" class="l m n"></b></a>
#q>.x <div id="q">
<div class="x">
</div>
</div>
- a>b+c <a>
+ a>b+c <a href="">
<b></b>
<c></c>
</a>
- a>b+c>d <a>
+ a>b+c>d <a href="">
<b></b>
<c><d></d></c>
</a>
-## Climb-up
+#### Climb-up
- a>b^c <a><b></b></a><c></c>
- a>b>c^d <a>
+ a>b^c <a href=""><b></b></a><c></c>
+ a>b>c^d <a href="">
<b><c></c></b>
<d></d>
</a>
- a>b>c^^d <a><b><c></c></b></a>
+ a>b>c^^d <a href=""><b><c></c></b></a>
<d></d>
-## Multiplication
+#### Multiplication
- a*1 <a></a>
- a*2 <a></a>
- <a></a>
- a/*2 <a/>
- <a/>
- a*2+b*2 <a></a>
- <a></a>
+ a*1 <a href=""></a>
+ a*2 <a href=""></a>
+ <a href=""></a>
+ a/*2 <a href=""/>
+ <a href=""/>
+ a*2+b*2 <a href=""></a>
+ <a href=""></a>
<b></b>
<b></b>
- a*2>b*2 <a>
+ a*2>b*2 <a href="">
<b></b>
<b></b>
</a>
- <a>
+ <a href="">
<b></b>
<b></b>
</a>
- a>b*2 <a>
+ a>b*2 <a href="">
<b></b>
<b></b>
</a>
- a#q.x>b#q.x*2 <a id="q" class="x">
+ a#q.x>b#q.x*2 <a id="q" class="x" href="">
<b id="q" class="x"></b>
<b id="q" class="x"></b>
</a>
- a#q.x>b/#q.x*2 <a id="q" class="x">
+ a#q.x>b/#q.x*2 <a id="q" class="x" href="">
<b id="q" class="x"/>
<b id="q" class="x"/>
</a>
-## Item numbering
+#### Item numbering
ul>li.item$*3 <ul>
<li class="item1"></li>
@@ -217,26 +209,26 @@ you'll transform your snippet into the appropriate tag structure.
<a3b3/>
<a4b2/>
<a5b1/>
- a.$*2>b.$$@-*3 <a class=\"1\">
+ a.$*2>b.$$@-*3 <a class=\"1\" href="">
<b class=\"03\"></b>
<b class=\"02\"></b>
<b class=\"01\"></b>
</a>
- <a class=\"2\">
+ <a class=\"2\" href="">
<b class=\"03\"></b>
<b class=\"02\"></b>
<b class=\"01\"></b>
</a>
(div>(a#id$$*2)+b.c$@-3+c#d$)*2
<div>
- <a id=\"id01\"></a>
- <a id=\"id02\"></a>
+ <a id=\"id01\" href=""></a>
+ <a id=\"id02\" href=""></a>
<b class=\"c4\"></b>
<c id=\"d1\"></c>
</div>
<div>
- <a id=\"id01\"></a>
- <a id=\"id02\"></a>
+ <a id=\"id01\" href=""></a>
+ <a id=\"id02\" href=""></a>
<b class=\"c3\"></b>
<c id=\"d2\"></c>
</div>
@@ -246,89 +238,89 @@ you'll transform your snippet into the appropriate tag structure.
<li class=\"c3\">price: 10$</li>
</ul>
-## Properties
-
- a x <a x=""></a>
- a x= <a x=""></a>
- a x="" <a x=""></a>
- a x=y <a x="y"></a>
- a x="y" <a x="y"></a>
- a x="()" <a x="()"></a>
- a x m <a x="" m=""></a>
- a x= m="" <a x="" m=""></a>
- a x=y m=l <a x="y" m="l"></a>
- a/ x=y m=l <a x="y" m="l"/>
- a#foo x=y m=l <a id="foo" x="y" m="l"></a>
- a.foo x=y m=l <a class="foo" x="y" m="l"></a>
- a#foo.bar.mu x=y m=l <a id="foo" class="bar mu" x="y" m="l"></a>
- a/#foo.bar.mu x=y m=l <a id="foo" class="bar mu" x="y" m="l"/>
- a x=y+b <a x="y"></a>
+#### Properties
+
+ b x <b x=""></b>
+ b x= <b x=""></b>
+ b x="" <b x=""></b>
+ b x=y <b x="y"></b>
+ b x="y" <b x="y"></b>
+ b x="()" <b x="()"></b>
+ b x m <b x="" m=""></b>
+ b x= m="" <b x="" m=""></b>
+ b x=y m=l <b x="y" m="l"></b>
+ b/ x=y m=l <b x="y" m="l"/>
+ b#foo x=y m=l <b id="foo" x="y" m="l"></b>
+ b.foo x=y m=l <b class="foo" x="y" m="l"></b>
+ b#foo.bar.mu x=y m=l <b id="foo" class="bar mu" x="y" m="l"></b>
+ b/#foo.bar.mu x=y m=l <b id="foo" class="bar mu" x="y" m="l"/>
+ b x=y+b <b x="y"></b>
<b></b>
- a x=y+b x=y <a x="y"></a>
+ b x=y+b x=y <b x="y"></b>
<b x="y"></b>
- a x=y>b <a x="y"><b></b></a>
- a x=y>b x=y <a x="y"><b x="y"></b></a>
- a x=y>b x=y+c x=y <a x="y">
+ b x=y>b <b x="y"><b></b></b>
+ b x=y>b x=y <b x="y"><b x="y"></b></b>
+ b x=y>b x=y+c x=y <b x="y">
<b x="y"></b>
<c x="y"></c>
- </a>
+ </b>
-## Parentheses
+#### Parentheses
- (a) <a></a>
- (a)+(b) <a></a>
+ (a) <a href=""></a>
+ (a)+(b) <a href=""></a>
<b></b>
- a>(b) <a><b></b></a>
- (a>b)>c <a><b></b></a>
- (a>b)+c <a><b></b></a>
+ a>(b) <a href=""><b></b></a>
+ (a>b)>c <a href=""><b></b></a>
+ (a>b)+c <a href=""><b></b></a>
<c></c>
z+(a>b)+c+k <z></z>
- <a><b></b></a>
+ <a href=""><b></b></a>
<c></c>
<k></k>
- (a)*2 <a></a>
- <a></a>
- ((a)*2) <a></a>
- <a></a>
- ((a))*2 <a></a>
- <a></a>
- (a>b)*2 <a><b></b></a>
- <a><b></b></a>
- (a+b)*2 <a></a>
+ (x)*2 <x></x>
+ <x></x>
+ ((x)*2) <x></x>
+ <x></x>
+ ((x))*2 <x></x>
+ <x></x>
+ (x>b)*2 <x><b></b></x>
+ <x><b></b></x>
+ (x+b)*2 <x></x>
<b></b>
- <a></a>
+ <x></x>
<b></b>
-## Text
+#### Text
- a{Click me} <a>Click me</a>
- a>{Click me}*2 <a>
+ a{Click me} <a href="">Click me</a>
+ a>{Click me}*2 <a href="">
Click me
Click me
</a>
- a{click}+b{here} <a>click</a>
+ x{click}+b{here} <x>click</x>
<b>here</b>
- a>{click}+b{here} <a>
+ span>{click}+b{here} <span>
click
<b>here</b>
- </a>
- p>{Click }+a{here}+{ to continue}
+ </span>
+ p>{Click}+span{here}+{ to continue}
<p>
- Click
- <a>here</a>
+ Click
+ <span>here</span>
to continue
</p>
- p{Click }+a{here}+{ to continue}
+ p{Click}+span{here}+{ to continue}
<p>
- Click
+ Click
</p>
- <a>here</a>
+ <span>here</span>
to continue
-## Filter: HTML with comments
+#### Filter: HTML with comments
a.b|c <!-- .b -->
- <a class="b"></a>
+ <a class="b" href=""></a>
<!-- /.b -->
#a>.b|c <!-- #a -->
<div id="a">
@@ -339,7 +331,7 @@ you'll transform your snippet into the appropriate tag structure.
</div>
<!-- /#a -->
-## Filter: HAML
+#### Filter: HAML
a|haml %a
a#q.x.y.z|haml %a#q.x.y.z
@@ -352,7 +344,7 @@ you'll transform your snippet into the appropriate tag structure.
%a{:href => "#"}
%br
-## Filter: Hiccup
+#### Filter: Hiccup
a|hic [:a]
a#q.x.y.z|hic [:a#q.x.y.z]
@@ -367,7 +359,125 @@ you'll transform your snippet into the appropriate tag structure.
[:p
[:b]]]
-## Filter: escape
+#### Filter: escape
script src=&quot;|e &lt;script src="&amp;quot;"&gt;
&lt;/script&gt;
+
+#### Aliases
+
+ html:5 <!doctype html>
+ <html lang="en">
+ <head>
+ <meta charset="UTF-8"/>
+ <title>Document</title>
+ </head>
+ <body>
+ </body>
+ </html>
+
+ html:xt <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+ <title>Document</title>
+ </head>
+ </html>
+
+ meta:vp <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
+
+
+* See HTML section of [cheat-sheet](http://docs.emmet.io/cheat-sheet/) to find more aliases.
+
+
+## CSS abbreviations
+
+#### Basic Usage
+
+ p1-2!+m10e+bd1#2s padding: 1px 2px !important;
+ margin: 10em;
+ border: 1px #222 solid;
+
+#### Keywords
+
+ m margin: ;
+ bg+ background: #fff url() 0 0 no-repeat;
+ c color: #000;
+
+* See CSS section of [cheat-sheet](http://docs.emmet.io/cheat-sheet/) to find more keywords.
+
+#### Values
+
+separate each value by '-' or ' ';
+
+ m1-2-3-4 margin: 1px 2px 3px 4px;
+ m1 2 3 4 margin: 1px 2px 3px 4px;
+ m1--2 margin: 1px -2px;
+ m1 -2 margin: 1px -2px;
+
+ bg+#c /back.png 10 20 repeat-x
+ background: #cccccc url(/back.png) 10px 20px repeat-x;
+
+#### Multiple property definition
+
+concatenate each property by '+';
+
+ m10+p0 margin: 10px;
+ padding: 0px;
+
+ bg++c#0 background: #fff url() 0 0 no-repeat;
+ color: #000;
+
+ m0+p10+c#f+fw:b+w100+h20+bg#f00
+ margin: 0px;
+ padding: 10px;
+ color: #fff;
+ font-weight: bold;
+ width: 100px;
+ height: 20px;
+ background: #f00;
+
+#### Value units
+
+ m10 margin: 10px;
+ m1.5 margin: 1.5em;
+ m1.5ex margin: 1.5ex;
+ m1.5x margin: 1.5ex;
+ m10foo margin: 10foo;
+ m10ex20em margin: 10ex 20em;
+ m10x20e margin: 10ex 20em;
+ m10x-5 margin: 10ex -5px;
+ w100p width: 100%;
+ m10p30e5x margin: 10% 30em 5ex;
+
+* Unit-aliases
+
+ e em
+ p %
+ x ex
+ r rem
+
+#### Unitless property
+
+ lh2 line-height: 2;
+ fw400 font-weight: 400;
+
+#### Color abbreviations
+
+ c#3 color: #333;
+ bd5#0s border: 5px #000 solid; /* s: solid, t: dotted, n: none, h: hidden */
+ bd5#20rgb border: 5px rgb(32,32,32);
+ bd5#20rgbt border: 5px rgb(32,32,32) dotted;
+
+* Color expansion
+
+ #1 #111
+ #e0 #e0e0e0
+ #fc0 #fc0
+
+#### Important
+
+ c#3!+bdrs2! color: #333 !important;
+ border-radius: 2px !important;
+
+* If you want further information, see [Emmet's documentation](http://docs.emmet.io/css-abbreviations/). \ No newline at end of file
diff --git a/conf/preferences.json b/conf/preferences.json
new file mode 100644
index 0000000..8062b9f
--- /dev/null
+++ b/conf/preferences.json
@@ -0,0 +1,372 @@
+{
+ "html": {
+ "tags": {
+ "a": {"block": false, "selfClosing": false, "defaultAttr": {"href": ""}},
+ "abbr": {"block": false, "selfClosing": false, "defaultAttr": {"title": ""}},
+ "acronym": {"block": false, "selfClosing": false, "defaultAttr": {"title": ""}},
+ "address": {"block": true, "selfClosing": false},
+ "applet": {"block": true, "selfClosing": false},
+ "area": {"block": false, "selfClosing": true, "defaultAttr": {"shape": "", "coords": "", "href": "", "alt": ""}},
+ "article": {"block": true, "selfClosing": false},
+ "aside": {"block": true, "selfClosing": false},
+ "audio": {"block": true, "selfClosing": false, "defaultAttr": {"src": ""}},
+ "b": {"block": false, "selfClosing": false},
+ "base": {"block": false, "selfClosing": true, "defaultAttr": {"href": ""}},
+ "basefont": {"block": false, "selfClosing": true},
+ "bdi": {"block": false, "selfClosing": false},
+ "bdo": {"block": true, "selfClosing": false, "defaultAttr": {"dir": ""}},
+ "big": {"block": false, "selfClosing": false},
+ "blockquote": {"block": true, "selfClosing": false},
+ "body": {"block": true, "selfClosing": false},
+ "br": {"block": false, "selfClosing": true},
+ "button": {"block": false, "selfClosing": false},
+ "canvas": {"block": false, "selfClosing": false},
+ "caption": {"block": false, "selfClosing": false},
+ "center": {"block": false, "selfClosing": false},
+ "cite": {"block": false, "selfClosing": false},
+ "code": {"block": false, "selfClosing": false},
+ "col": {"block": false, "selfClosing": true},
+ "colgroup": {"block": true, "selfClosing": false},
+ "command": {"block": false, "selfClosing": false},
+ "datalist": {"block": true, "selfClosing": false},
+ "dd": {"block": false, "selfClosing": false},
+ "del": {"block": false, "selfClosing": false},
+ "details": {"block": true, "selfClosing": false},
+ "dfn": {"block": false, "selfClosing": false},
+ "dialog": {"block": false, "selfClosing": false},
+ "dir": {"block": true, "selfClosing": false},
+ "div": {"block": true, "selfClosing": false},
+ "dl": {"block": true, "selfClosing": false},
+ "dt": {"block": false, "selfClosing": false},
+ "em": {"block": false, "selfClosing": false},
+ "embed": {"block": false, "selfClosing": true, "defaultAttr": {"src": "", "type": ""}},
+ "fieldset": {"block": true, "selfClosing": false},
+ "figcaption": {"block": false, "selfClosing": false},
+ "figure": {"block": true, "selfClosing": false},
+ "font": {"block": false, "selfClosing": false},
+ "footer": {"block": true, "selfClosing": false},
+ "form": {"block": true, "selfClosing": false, "defaultAttr": {"action": ""}},
+ "frame": {"block": false, "selfClosing": true},
+ "frameset": {"block": true, "selfClosing": false},
+ "head": {"block": true, "selfClosing": false},
+ "header": {"block": true, "selfClosing": false},
+ "hgroup": {"block": true, "selfClosing": false},
+ "h1": {"block": false, "selfClosing": false},
+ "h2": {"block": false, "selfClosing": false},
+ "h3": {"block": false, "selfClosing": false},
+ "h4": {"block": false, "selfClosing": false},
+ "h5": {"block": false, "selfClosing": false},
+ "h6": {"block": false, "selfClosing": false},
+ "hr": {"block": false, "selfClosing": true},
+ "html": {"block": true, "selfClosing": false},
+ "i": {"block": false, "selfClosing": false},
+ "iframe": {"block": false, "selfClosing": false, "defaultAttr": {"src": "", "frameborder": "0"}},
+ "img": {"block": false, "selfClosing": true, "defaultAttr": {"src": "", "alt": ""}},
+ "input": {"block": false, "selfClosing": true, "defaultAttr": {"type": "text", "name": "", "value": ""}},
+ "ins": {"block": false, "selfClosing": false},
+ "kbd": {"block": false, "selfClosing": false},
+ "keygen": {"block": false, "selfClosing": true},
+ "label": {"block": false, "selfClosing": false, "defaultAttr": {"for": ""}},
+ "legend": {"block": false, "selfClosing": false},
+ "li": {"block": false, "selfClosing": false},
+ "link": {"block": false, "selfClosing": true, "defaultAttr": {"rel": "stylesheet", "href": ""}},
+ "map": {"block": true, "selfClosing": false, "defaultAttr": {"name": ""}},
+ "mark": {"block": false, "selfClosing": false},
+ "menu": {"block": true, "selfClosing": false},
+ "meta": {"block": false, "selfClosing": true},
+ "meter": {"block": false, "selfClosing": false},
+ "nav": {"block": true, "selfClosing": false},
+ "noframes": {"block": false, "selfClosing": false},
+ "noscript": {"block": false, "selfClosing": false},
+ "object": {"block": false, "selfClosing": false, "defaultAttr": {"data": "", "type": ""}},
+ "ol": {"block": true, "selfClosing": false},
+ "optgroup": {"block": true, "selfClosing": false},
+ "option": {"block": false, "selfClosing": false, "defaultAttr": {"value": ""}},
+ "output": {"block": false, "selfClosing": false},
+ "p": {"block": false, "selfClosing": false},
+ "param": {"block": false, "selfClosing": true, "defaultAttr": {"name": "", "value": ""}},
+ "pre": {"block": true, "selfClosing": false},
+ "progress": {"block": false, "selfClosing": false},
+ "q": {"block": false, "selfClosing": false},
+ "rp": {"block": false, "selfClosing": false},
+ "rt": {"block": false, "selfClosing": false},
+ "ruby": {"block": false, "selfClosing": false},
+ "s": {"block": false, "selfClosing": false},
+ "samp": {"block": false, "selfClosing": false},
+ "script": {"block": true, "selfClosing": false},
+ "section": {"block": true, "selfClosing": false},
+ "select": {"block": true, "selfClosing": false, "defaultAttr": {"name": "", "id": ""}},
+ "small": {"block": false, "selfClosing": false},
+ "source": {"block": false, "selfClosing": true},
+ "span": {"block": false, "selfClosing": false},
+ "strike": {"block": false, "selfClosing": false},
+ "strong": {"block": false, "selfClosing": false},
+ "style": {"block": true, "selfClosing": false},
+ "sub": {"block": false, "selfClosing": false},
+ "summary": {"block": false, "selfClosing": false},
+ "sup": {"block": false, "selfClosing": false},
+ "table": {"block": true, "selfClosing": false},
+ "tbody": {"block": true, "selfClosing": false},
+ "td": {"block": false, "selfClosing": false},
+ "textarea": {"block": true, "selfClosing": false, "defaultAttr": {"name": "", "id": "", "cols": "30", "rows": "10"}},
+ "tfoot": {"block": true, "selfClosing": false},
+ "th": {"block": false, "selfClosing": false},
+ "thead": {"block": true, "selfClosing": false},
+ "time": {"block": false, "selfClosing": false},
+ "title": {"block": false, "selfClosing": false},
+ "tr": {"block": true, "selfClosing": false},
+ "track": {"block": false, "selfClosing": true},
+ "tt": {"block": false, "selfClosing": false},
+ "u": {"block": false, "selfClosing": false},
+ "ul": {"block": true, "selfClosing": false},
+ "var": {"block": false, "selfClosing": false},
+ "video": {"block": true, "selfClosing": false, "defaultAttr": {"src": ""}},
+ "wbr": {"block": false, "selfClosing": false}
+ }
+ },
+ "css": {
+ "vendorPrefixesProperties": {
+ "text-fill-color": ["webkit"],
+ "ime-mode": ["ms"],
+ "grid-layer": ["ms"],
+ "user-drag": ["webkit"],
+ "mask-image": ["webkit"],
+ "font-feature-settings": ["moz", "ms"],
+ "mask-box-image-slice": ["webkit"],
+ "background-composite": ["webkit"],
+ "text-underline-position": ["ms"],
+ "hyphenate-limit-chars": ["ms"],
+ "marquee-speed": ["o"],
+ "input-required": ["o"],
+ "color-correction": ["webkit"],
+ "background-size": ["webkit"],
+ "background-origin": ["webkit"],
+ "wrap-through": ["ms"],
+ "text-emphasis-position": ["webkit"],
+ "text-decoration-style": ["moz"],
+ "dashboard-region": ["webkit", "o"],
+ "scrollbar-track-color": ["ms"],
+ "grid-columns": ["ms"],
+ "link-source": ["o"],
+ "hyphenate-limit-lines": ["ms"],
+ "border-radius": ["webkit", "moz"],
+ "text-stroke-color": ["webkit"],
+ "box-shadow": ["webkit", "moz"],
+ "scrollbar-face-color": ["ms"],
+ "scrollbar-highlight-color": ["ms"],
+ "border-left-colors": ["moz"],
+ "word-wrap": ["ms"],
+ "text-emphasis-color": ["webkit"],
+ "hyphens": ["webkit", "moz", "ms"],
+ "marquee-direction": ["webkit"],
+ "rtl-ordering": ["webkit"],
+ "box-lines": ["webkit", "ms"],
+ "column-break-inside": ["webkit"],
+ "scroll-snap-points-x": ["ms"],
+ "grid-row-align": ["ms"],
+ "force-broken-image-icon": ["moz"],
+ "animation-fill-mode": ["webkit", "moz", "o"],
+ "box-line-progression": ["ms"],
+ "column-break-before": ["webkit"],
+ "scroll-boundary-left": ["ms"],
+ "text-combine": ["webkit"],
+ "grid-column-align": ["ms"],
+ "perspective-origin": ["webkit", "moz", "ms"],
+ "overflow-style": ["ms"],
+ "mask-position": ["webkit"],
+ "content-zoom-chaining": ["ms"],
+ "column-span": ["webkit"],
+ "border-fit": ["webkit"],
+ "outline-radius-topright": ["moz"],
+ "tab-size": ["moz", "o"],
+ "layout-grid-type": ["ms"],
+ "mask-clip": ["webkit"],
+ "grid-row": ["ms"],
+ "text-security": ["webkit"],
+ "text-align-last": ["ms"],
+ "svg-shadow": ["webkit"],
+ "accelerator": ["ms"],
+ "locale": ["webkit"],
+ "line-clamp": ["webkit"],
+ "column-count": ["webkit", "moz"],
+ "line-box-contain": ["webkit"],
+ "line-break": ["webkit", "ms"],
+ "transform-style": ["webkit", "moz", "ms"],
+ "perspective": ["webkit", "moz", "ms"],
+ "orient": ["moz"],
+ "float-edge": ["moz"],
+ "image-region": ["moz"],
+ "background-inline-policy": ["moz"],
+ "user-modify": ["webkit", "moz"],
+ "content-zoom-snap-type": ["ms"],
+ "marquee-loop": ["o"],
+ "outline-radius-bottomright": ["moz"],
+ "column-rule-style": ["webkit", "moz"],
+ "scroll-boundary-right": ["ms"],
+ "text-kashida-space": ["ms"],
+ "scroll-chaining": ["ms"],
+ "column-gap": ["webkit", "moz"],
+ "nbsp-mode": ["webkit"],
+ "mask-box-image-source": ["webkit"],
+ "font-language-override": ["moz"],
+ "animation-delay": ["webkit", "moz", "o"],
+ "box-flex-group": ["webkit"],
+ "column-rule-width": ["webkit", "moz"],
+ "border-image": ["webkit", "moz", "o"],
+ "animation-direction": ["webkit", "moz", "o"],
+ "marquee-repetition": ["webkit"],
+ "grid-column": ["ms"],
+ "box-align": ["webkit", "moz", "ms"],
+ "user-input": ["moz"],
+ "animation-duration": ["webkit", "moz", "o"],
+ "transform-origin-y": ["ms"],
+ "box-ordinal-group": ["webkit", "moz", "ms"],
+ "box-orient": ["webkit", "moz", "ms"],
+ "stack-sizing": ["moz"],
+ "user-focus": ["moz"],
+ "transition": ["webkit", "moz", "ms", "o"],
+ "text-size-adjust": ["moz", "ms"],
+ "filter": ["ms"],
+ "content-zoom-boundary": ["ms"],
+ "perspective-origin-x": ["ms"],
+ "perspective-origin-y": ["ms"],
+ "column-rule-color": ["webkit", "moz"],
+ "high-contrast-adjust": ["ms"],
+ "text-justify": ["ms"],
+ "text-decoration-color": ["moz"],
+ "block-progression": ["ms"],
+ "border-horizontal-spacing": ["webkit"],
+ "scroll-snap-points-y": ["ms"],
+ "wrap-flow": ["ms"],
+ "content-zoom-boundary-min": ["ms"],
+ "table-baseline": ["o"],
+ "background-clip": ["webkit", "moz"],
+ "scrollbar-arrow-color": ["ms"],
+ "scroll-snap-type": ["ms"],
+ "text-emphasis-style": ["webkit"],
+ "flow-from": ["ms"],
+ "backface-visibility": ["webkit", "moz", "ms"],
+ "transform": ["webkit", "moz", "ms", "o"],
+ "column-break-after": ["webkit"],
+ "mask-composite": ["webkit"],
+ "layout-grid": ["ms"],
+ "mask-box-image-repeat": ["webkit"],
+ "scrollbar-base-color": ["ms"],
+ "window-shadow": ["moz"],
+ "object-fit": ["o"],
+ "text-decorations-in-effect": ["webkit"],
+ "box-flex": ["webkit", "moz", "ms"],
+ "hyphenate-limit-after": ["webkit"],
+ "wrap-margin": ["ms"],
+ "animation-play-state": ["webkit", "moz", "o"],
+ "transition-delay": ["webkit", "moz", "ms", "o"],
+ "input-format": ["o"],
+ "mask-attachment": ["webkit"],
+ "outline-radius-topleft": ["moz"],
+ "animation-iteration-count": ["webkit", "moz", "o"],
+ "link": ["o"],
+ "content-zoom-boundary-max": ["ms"],
+ "user-select": ["webkit", "moz", "ms"],
+ "text-autospace": ["ms"],
+ "mask-origin": ["webkit"],
+ "text-orientation": ["webkit"],
+ "border-bottom-colors": ["moz"],
+ "scroll-boundary-top": ["ms"],
+ "content-zooming": ["ms"],
+ "appearance": ["webkit", "moz"],
+ "scroll-snap-x": ["ms"],
+ "scroll-snap-y": ["ms"],
+ "margin-before-collapse": ["webkit"],
+ "marquee-increment": ["webkit"],
+ "behavior": ["ms"],
+ "box-pack": ["webkit", "moz", "ms"],
+ "highlight": ["webkit"],
+ "scrollbar-darkshadow-color": ["ms"],
+ "scroll-boundary-bottom": ["ms"],
+ "scroll-rails": ["ms"],
+ "text-blink": ["moz"],
+ "interpolation-mode": ["ms"],
+ "column-width": ["webkit", "moz"],
+ "accesskey": ["o"],
+ "grid-column-span": ["ms"],
+ "binding": ["moz"],
+ "transform-origin": ["webkit", "moz", "ms", "o"],
+ "text-decoration-line": ["moz"],
+ "marquee-dir": ["o"],
+ "animation-name": ["webkit", "moz", "o"],
+ "transform-origin-z": ["ms"],
+ "content-zoom-snap": ["ms"],
+ "border-top-colors": ["moz"],
+ "border-vertical-spacing": ["webkit"],
+ "grid-rows": ["ms"],
+ "box-reflect": ["webkit"],
+ "box-sizing": ["webkit", "moz"],
+ "mask-box-image-outset": ["webkit"],
+ "outline-radius-bottomleft": ["moz"],
+ "text-overflow": ["ms"],
+ "border-right-colors": ["moz"],
+ "layout-flow": ["ms"],
+ "box-direction": ["webkit", "moz", "ms"],
+ "animation": ["webkit", "o"],
+ "hyphenate-character": ["webkit"],
+ "flow-into": ["ms"],
+ "mask-size": ["webkit"],
+ "content-zoom-snap-points": ["ms"],
+ "grid-row-span": ["ms"],
+ "touch-action": ["ms"],
+ "marquee-style": ["webkit", "o"],
+ "margin-after-collapse": ["webkit"],
+ "mask-box-image": ["webkit"],
+ "scrollbar-shadow-color": ["ms"],
+ "object-position": ["o"],
+ "hyphenate-limit-zone": ["ms"],
+ "layout-grid-char": ["ms"],
+ "transform-origin-x": ["ms"],
+ "transition-property": ["webkit", "moz", "ms", "o"],
+ "word-break": ["ms"],
+ "text-stroke-width": ["webkit"],
+ "scroll-boundary": ["ms"],
+ "mask-repeat": ["webkit"],
+ "writing-mode": ["webkit", "ms"],
+ "layout-grid-mode": ["ms"],
+ "background-position-y": ["ms"],
+ "animation-timing-function": ["webkit", "moz", "o"],
+ "background-position-x": ["ms"],
+ "hyphenate-limit-before": ["webkit"],
+ "transition-duration": ["webkit", "moz", "ms", "o"],
+ "mask-box-image-width": ["webkit"],
+ "layout-grid-line": ["ms"],
+ "font-smoothing": ["webkit"],
+ "transition-timing-function": ["webkit", "moz", "ms", "o"]
+ },
+ "unitlessProperties": ["z-index", "line-height", "opacity", "font-weight", "zoom"],
+ "intUnit": "px",
+ "floatUnit": "em",
+ "keywords": ["auto", "inherit"],
+ "keywordAliases": {
+ "a":"auto",
+ "i":"inherit",
+ "s":"solid",
+ "da":"dashed",
+ "do":"dotted",
+ "t":"transparent"
+ },
+ "unitAliases": {
+ "-": "px",
+ "e": "em",
+ "p": "%",
+ "x": "ex",
+ "r": "rem"
+ },
+ "color": {
+ "shortenIfPossible": true,
+ "case": "auto",
+ "trailingAliases": {
+ "s": "solid",
+ "t": "dotted",
+ "n": "none",
+ "h": "hidden"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/conf/snippets.json b/conf/snippets.json
new file mode 100644
index 0000000..d1e5ae6
--- /dev/null
+++ b/conf/snippets.json
@@ -0,0 +1,717 @@
+{
+ "css": {
+
+ "snippets": {
+ "@i": "@import url(|);",
+ "@import": "@import url(|);",
+ "@m": "@media ${1:screen} {\n\t|\n}",
+ "@media": "@media ${1:screen} {\n\t|\n}",
+ "@f": "@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}",
+ "@f+": "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}",
+
+ "@kf": "@-webkit-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}",
+
+
+ "anim": "animation:|;",
+ "anim-": "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};",
+ "animdel": "animation-delay:${1:time};",
+
+ "animdir": "animation-direction:${1:normal};",
+ "animdir:n": "animation-direction:normal;",
+ "animdir:r": "animation-direction:reverse;",
+ "animdir:a": "animation-direction:alternate;",
+ "animdir:ar": "animation-direction:alternate-reverse;",
+
+ "animdur": "animation-duration:${1:0}s;",
+
+ "animfm": "animation-fill-mode:${1:both};",
+ "animfm:f": "animation-fill-mode:forwards;",
+ "animfm:b": "animation-fill-mode:backwards;",
+ "animfm:bt": "animation-fill-mode:both;",
+ "animfm:bh": "animation-fill-mode:both;",
+
+ "animic": "animation-iteration-count:${1:1};",
+ "animic:i": "animation-iteration-count:infinite;",
+
+ "animn": "animation-name:${1:none};",
+
+ "animps": "animation-play-state:${1:running};",
+ "animps:p": "animation-play-state:paused;",
+ "animps:r": "animation-play-state:running;",
+
+ "animtf": "animation-timing-function:${1:linear};",
+ "animtf:e": "animation-timing-function:ease;",
+ "animtf:ei": "animation-timing-function:ease-in;",
+ "animtf:eo": "animation-timing-function:ease-out;",
+ "animtf:eio": "animation-timing-function:ease-in-out;",
+ "animtf:l": "animation-timing-function:linear;",
+ "animtf:cb": "animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});",
+
+ "ap": "appearance:${1:none};",
+
+ "!": "!important",
+ "pos": "position:${1:relative};",
+ "pos:s": "position:static;",
+ "pos:a": "position:absolute;",
+ "pos:r": "position:relative;",
+ "pos:f": "position:fixed;",
+ "t": "top:|;",
+ "t:a": "top:auto;",
+ "r": "right:|;",
+ "r:a": "right:auto;",
+ "b": "bottom:|;",
+ "b:a": "bottom:auto;",
+ "l": "left:|;",
+ "l:a": "left:auto;",
+ "z": "z-index:|;",
+ "z:a": "z-index:auto;",
+ "fl": "float:${1:left};",
+ "fl:n": "float:none;",
+ "fl:l": "float:left;",
+ "fl:r": "float:right;",
+ "cl": "clear:${1:both};",
+ "cl:n": "clear:none;",
+ "cl:l": "clear:left;",
+ "cl:r": "clear:right;",
+ "cl:b": "clear:both;",
+
+ "colm": "columns:|;",
+ "colmc": "column-count:|;",
+ "colmf": "column-fill:|;",
+ "colmg": "column-gap:|;",
+ "colmr": "column-rule:|;",
+ "colmrc": "column-rule-color:|;",
+ "colmrs": "column-rule-style:|;",
+ "colmrw": "column-rule-width:|;",
+ "colms": "column-span:|;",
+ "colmw": "column-width:|;",
+
+ "d": "display:${1:block};",
+ "d:n": "display:none;",
+ "d:b": "display:block;",
+ "d:i": "display:inline;",
+ "d:ib": "display:inline-block;",
+ "d:li": "display:list-item;",
+ "d:ri": "display:run-in;",
+ "d:cp": "display:compact;",
+ "d:tb": "display:table;",
+ "d:itb": "display:inline-table;",
+ "d:tbcp": "display:table-caption;",
+ "d:tbcl": "display:table-column;",
+ "d:tbclg": "display:table-column-group;",
+ "d:tbhg": "display:table-header-group;",
+ "d:tbfg": "display:table-footer-group;",
+ "d:tbr": "display:table-row;",
+ "d:tbrg": "display:table-row-group;",
+ "d:tbc": "display:table-cell;",
+ "d:rb": "display:ruby;",
+ "d:rbb": "display:ruby-base;",
+ "d:rbbg": "display:ruby-base-group;",
+ "d:rbt": "display:ruby-text;",
+ "d:rbtg": "display:ruby-text-group;",
+ "v": "visibility:${1:hidden};",
+ "v:v": "visibility:visible;",
+ "v:h": "visibility:hidden;",
+ "v:c": "visibility:collapse;",
+ "ov": "overflow:${1:hidden};",
+ "ov:v": "overflow:visible;",
+ "ov:h": "overflow:hidden;",
+ "ov:s": "overflow:scroll;",
+ "ov:a": "overflow:auto;",
+ "ovx": "overflow-x:${1:hidden};",
+ "ovx:v": "overflow-x:visible;",
+ "ovx:h": "overflow-x:hidden;",
+ "ovx:s": "overflow-x:scroll;",
+ "ovx:a": "overflow-x:auto;",
+ "ovy": "overflow-y:${1:hidden};",
+ "ovy:v": "overflow-y:visible;",
+ "ovy:h": "overflow-y:hidden;",
+ "ovy:s": "overflow-y:scroll;",
+ "ovy:a": "overflow-y:auto;",
+ "ovs": "overflow-style:${1:scrollbar};",
+ "ovs:a": "overflow-style:auto;",
+ "ovs:s": "overflow-style:scrollbar;",
+ "ovs:p": "overflow-style:panner;",
+ "ovs:m": "overflow-style:move;",
+ "ovs:mq": "overflow-style:marquee;",
+ "zoo": "zoom:1;",
+ "zm": "zoom:1;",
+ "cp": "clip:|;",
+ "cp:a": "clip:auto;",
+ "cp:r": "clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});",
+ "bxz": "box-sizing:${1:border-box};",
+ "bxz:cb": "box-sizing:content-box;",
+ "bxz:bb": "box-sizing:border-box;",
+ "bxsh": "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};",
+ "bxsh:r": "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});",
+ "bxsh:ra": "box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});",
+ "bxsh:n": "box-shadow:none;",
+ "m": "margin:|;",
+ "m:a": "margin:auto;",
+ "mt": "margin-top:|;",
+ "mt:a": "margin-top:auto;",
+ "mr": "margin-right:|;",
+ "mr:a": "margin-right:auto;",
+ "mb": "margin-bottom:|;",
+ "mb:a": "margin-bottom:auto;",
+ "ml": "margin-left:|;",
+ "ml:a": "margin-left:auto;",
+ "p": "padding:|;",
+ "pt": "padding-top:|;",
+ "pr": "padding-right:|;",
+ "pb": "padding-bottom:|;",
+ "pl": "padding-left:|;",
+ "w": "width:|;",
+ "w:a": "width:auto;",
+ "h": "height:|;",
+ "h:a": "height:auto;",
+ "maw": "max-width:|;",
+ "maw:n": "max-width:none;",
+ "mah": "max-height:|;",
+ "mah:n": "max-height:none;",
+ "miw": "min-width:|;",
+ "mih": "min-height:|;",
+ "mar": "max-resolution:${1:res};",
+ "mir": "min-resolution:${1:res};",
+ "ori": "orientation:|;",
+ "ori:l": "orientation:landscape;",
+ "ori:p": "orientation:portrait;",
+ "ol": "outline:|;",
+ "ol:n": "outline:none;",
+ "olo": "outline-offset:|;",
+ "olw": "outline-width:|;",
+ "ols": "outline-style:|;",
+ "olc": "outline-color:${1:#000};",
+ "olc:i": "outline-color:invert;",
+ "bd": "border:|;",
+ "bd+": "border:${1:1px} ${2:solid} ${3:#000};",
+ "bd:n": "border:none;",
+ "bdbk": "border-break:${1:close};",
+ "bdbk:c": "border-break:close;",
+ "bdcl": "border-collapse:|;",
+ "bdcl:c": "border-collapse:collapse;",
+ "bdcl:s": "border-collapse:separate;",
+ "bdc": "border-color:${1:#000};",
+ "bdc:t": "border-color:transparent;",
+ "bdi": "border-image:url(|);",
+ "bdi:n": "border-image:none;",
+ "bdti": "border-top-image:url(|);",
+ "bdti:n": "border-top-image:none;",
+ "bdri": "border-right-image:url(|);",
+ "bdri:n": "border-right-image:none;",
+ "bdbi": "border-bottom-image:url(|);",
+ "bdbi:n": "border-bottom-image:none;",
+ "bdli": "border-left-image:url(|);",
+ "bdli:n": "border-left-image:none;",
+ "bdci": "border-corner-image:url(|);",
+ "bdci:n": "border-corner-image:none;",
+ "bdci:c": "border-corner-image:continue;",
+ "bdtli": "border-top-left-image:url(|);",
+ "bdtli:n": "border-top-left-image:none;",
+ "bdtli:c": "border-top-left-image:continue;",
+ "bdtri": "border-top-right-image:url(|);",
+ "bdtri:n": "border-top-right-image:none;",
+ "bdtri:c": "border-top-right-image:continue;",
+ "bdbri": "border-bottom-right-image:url(|);",
+ "bdbri:n": "border-bottom-right-image:none;",
+ "bdbri:c": "border-bottom-right-image:continue;",
+ "bdbli": "border-bottom-left-image:url(|);",
+ "bdbli:n": "border-bottom-left-image:none;",
+ "bdbli:c": "border-bottom-left-image:continue;",
+ "bdf": "border-fit:${1:repeat};",
+ "bdf:c": "border-fit:clip;",
+ "bdf:r": "border-fit:repeat;",
+ "bdf:sc": "border-fit:scale;",
+ "bdf:st": "border-fit:stretch;",
+ "bdf:ow": "border-fit:overwrite;",
+ "bdf:of": "border-fit:overflow;",
+ "bdf:sp": "border-fit:space;",
+ "bdlen": "border-length:|;",
+ "bdlen:a": "border-length:auto;",
+ "bdsp": "border-spacing:|;",
+ "bds": "border-style:|;",
+ "bds:n": "border-style:none;",
+ "bds:h": "border-style:hidden;",
+ "bds:dt": "border-style:dotted;",
+ "bds:ds": "border-style:dashed;",
+ "bds:s": "border-style:solid;",
+ "bds:db": "border-style:double;",
+ "bds:dtds": "border-style:dot-dash;",
+ "bds:dtdtds": "border-style:dot-dot-dash;",
+ "bds:w": "border-style:wave;",
+ "bds:g": "border-style:groove;",
+ "bds:r": "border-style:ridge;",
+ "bds:i": "border-style:inset;",
+ "bds:o": "border-style:outset;",
+ "bdw": "border-width:|;",
+ "bdtw": "border-top-width:|;",
+ "bdrw": "border-right-width:|;",
+ "bdbw": "border-bottom-width:|;",
+ "bdlw": "border-left-width:|;",
+ "bdt": "border-top:|;",
+ "bt": "border-top:|;",
+ "bdt+": "border-top:${1:1px} ${2:solid} ${3:#000};",
+ "bdt:n": "border-top:none;",
+ "bdts": "border-top-style:|;",
+ "bdts:n": "border-top-style:none;",
+ "bdtc": "border-top-color:${1:#000};",
+ "bdtc:t": "border-top-color:transparent;",
+ "bdr": "border-right:|;",
+ "br": "border-right:|;",
+ "bdr+": "border-right:${1:1px} ${2:solid} ${3:#000};",
+ "bdr:n": "border-right:none;",
+ "bdrst": "border-right-style:|;",
+ "bdrst:n": "border-right-style:none;",
+ "bdrc": "border-right-color:${1:#000};",
+ "bdrc:t": "border-right-color:transparent;",
+ "bdb": "border-bottom:|;",
+ "bb": "border-bottom:|;",
+ "bdb+": "border-bottom:${1:1px} ${2:solid} ${3:#000};",
+ "bdb:n": "border-bottom:none;",
+ "bdbs": "border-bottom-style:|;",
+ "bdbs:n": "border-bottom-style:none;",
+ "bdbc": "border-bottom-color:${1:#000};",
+ "bdbc:t": "border-bottom-color:transparent;",
+ "bdl": "border-left:|;",
+ "bl": "border-left:|;",
+ "bdl+": "border-left:${1:1px} ${2:solid} ${3:#000};",
+ "bdl:n": "border-left:none;",
+ "bdls": "border-left-style:|;",
+ "bdls:n": "border-left-style:none;",
+ "bdlc": "border-left-color:${1:#000};",
+ "bdlc:t": "border-left-color:transparent;",
+ "bdrs": "border-radius:|;",
+ "bdtrrs": "border-top-right-radius:|;",
+ "bdtlrs": "border-top-left-radius:|;",
+ "bdbrrs": "border-bottom-right-radius:|;",
+ "bdblrs": "border-bottom-left-radius:|;",
+ "bg": "background:|;",
+ "bg+": "background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};",
+ "bg:n": "background:none;",
+ "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",
+ "bgc": "background-color:${1:#fff};",
+ "bgc:t": "background-color:transparent;",
+ "bgi": "background-image:url(|);",
+ "bgi:n": "background-image:none;",
+ "bgr": "background-repeat:|;",
+ "bgr:n": "background-repeat:no-repeat;",
+ "bgr:x": "background-repeat:repeat-x;",
+ "bgr:y": "background-repeat:repeat-y;",
+ "bgr:sp": "background-repeat:space;",
+ "bgr:rd": "background-repeat:round;",
+ "bga": "background-attachment:|;",
+ "bga:f": "background-attachment:fixed;",
+ "bga:s": "background-attachment:scroll;",
+ "bgp": "background-position:${1:0} ${2:0};",
+ "bgpx": "background-position-x:|;",
+ "bgpy": "background-position-y:|;",
+ "bgbk": "background-break:|;",
+ "bgbk:bb": "background-break:bounding-box;",
+ "bgbk:eb": "background-break:each-box;",
+ "bgbk:c": "background-break:continuous;",
+ "bgcp": "background-clip:${1:padding-box};",
+ "bgcp:bb": "background-clip:border-box;",
+ "bgcp:pb": "background-clip:padding-box;",
+ "bgcp:cb": "background-clip:content-box;",
+ "bgcp:nc": "background-clip:no-clip;",
+ "bgo": "background-origin:|;",
+ "bgo:pb": "background-origin:padding-box;",
+ "bgo:bb": "background-origin:border-box;",
+ "bgo:cb": "background-origin:content-box;",
+ "bgsz": "background-size:|;",
+ "bgsz:a": "background-size:auto;",
+ "bgsz:ct": "background-size:contain;",
+ "bgsz:cv": "background-size:cover;",
+ "c": "color:${1:#000};",
+ "c:r": "color:rgb(${1:0}, ${2:0}, ${3:0});",
+ "c:ra": "color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});",
+ "cm": "/* |${child} */",
+ "cnt": "content:'|';",
+ "cnt:n": "content:normal;",
+ "cnt:oq": "content:open-quote;",
+ "cnt:noq": "content:no-open-quote;",
+ "cnt:cq": "content:close-quote;",
+ "cnt:ncq": "content:no-close-quote;",
+ "cnt:a": "content:attr(|);",
+ "cnt:c": "content:counter(|);",
+ "cnt:cs": "content:counters(|);",
+
+
+ "tbl": "table-layout:|;",
+ "tbl:a": "table-layout:auto;",
+ "tbl:f": "table-layout:fixed;",
+ "cps": "caption-side:|;",
+ "cps:t": "caption-side:top;",
+ "cps:b": "caption-side:bottom;",
+ "ec": "empty-cells:|;",
+ "ec:s": "empty-cells:show;",
+ "ec:h": "empty-cells:hide;",
+ "lis": "list-style:|;",
+ "lis:n": "list-style:none;",
+ "lisp": "list-style-position:|;",
+ "lisp:i": "list-style-position:inside;",
+ "lisp:o": "list-style-position:outside;",
+ "list": "list-style-type:|;",
+ "list:n": "list-style-type:none;",
+ "list:d": "list-style-type:disc;",
+ "list:c": "list-style-type:circle;",
+ "list:s": "list-style-type:square;",
+ "list:dc": "list-style-type:decimal;",
+ "list:dclz": "list-style-type:decimal-leading-zero;",
+ "list:lr": "list-style-type:lower-roman;",
+ "list:ur": "list-style-type:upper-roman;",
+ "lisi": "list-style-image:|;",
+ "lisi:n": "list-style-image:none;",
+ "q": "quotes:|;",
+ "q:n": "quotes:none;",
+ "q:ru": "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';",
+ "q:en": "quotes:'\\201C' '\\201D' '\\2018' '\\2019';",
+ "ct": "content:|;",
+ "ct:n": "content:normal;",
+ "ct:oq": "content:open-quote;",
+ "ct:noq": "content:no-open-quote;",
+ "ct:cq": "content:close-quote;",
+ "ct:ncq": "content:no-close-quote;",
+ "ct:a": "content:attr(|);",
+ "ct:c": "content:counter(|);",
+ "ct:cs": "content:counters(|);",
+ "coi": "counter-increment:|;",
+ "cor": "counter-reset:|;",
+ "va": "vertical-align:${1:top};",
+ "va:sup": "vertical-align:super;",
+ "va:t": "vertical-align:top;",
+ "va:tt": "vertical-align:text-top;",
+ "va:m": "vertical-align:middle;",
+ "va:bl": "vertical-align:baseline;",
+ "va:b": "vertical-align:bottom;",
+ "va:tb": "vertical-align:text-bottom;",
+ "va:sub": "vertical-align:sub;",
+ "ta": "text-align:${1:left};",
+ "ta:l": "text-align:left;",
+ "ta:c": "text-align:center;",
+ "ta:r": "text-align:right;",
+ "ta:j": "text-align:justify;",
+ "ta-lst": "text-align-last:|;",
+ "tal:a": "text-align-last:auto;",
+ "tal:l": "text-align-last:left;",
+ "tal:c": "text-align-last:center;",
+ "tal:r": "text-align-last:right;",
+ "td": "text-decoration:${1:none};",
+ "td:n": "text-decoration:none;",
+ "td:u": "text-decoration:underline;",
+ "td:o": "text-decoration:overline;",
+ "td:l": "text-decoration:line-through;",
+ "te": "text-emphasis:|;",
+ "te:n": "text-emphasis:none;",
+ "te:ac": "text-emphasis:accent;",
+ "te:dt": "text-emphasis:dot;",
+ "te:c": "text-emphasis:circle;",
+ "te:ds": "text-emphasis:disc;",
+ "te:b": "text-emphasis:before;",
+ "te:a": "text-emphasis:after;",
+ "th": "text-height:|;",
+ "th:a": "text-height:auto;",
+ "th:f": "text-height:font-size;",
+ "th:t": "text-height:text-size;",
+ "th:m": "text-height:max-size;",
+ "ti": "text-indent:|;",
+ "ti:-": "text-indent:-9999px;",
+ "tj": "text-justify:|;",
+ "tj:a": "text-justify:auto;",
+ "tj:iw": "text-justify:inter-word;",
+ "tj:ii": "text-justify:inter-ideograph;",
+ "tj:ic": "text-justify:inter-cluster;",
+ "tj:d": "text-justify:distribute;",
+ "tj:k": "text-justify:kashida;",
+ "tj:t": "text-justify:tibetan;",
+ "tov": "text-overflow:${1:ellipsis};",
+ "tov:e": "text-overflow:ellipsis;",
+ "tov:c": "text-overflow:clip;",
+ "to": "text-outline:|;",
+ "to+": "text-outline:${1:0} ${2:0} ${3:#000};",
+ "to:n": "text-outline:none;",
+ "tr": "text-replace:|;",
+ "tr:n": "text-replace:none;",
+ "tt": "text-transform:${1:uppercase};",
+ "tt:n": "text-transform:none;",
+ "tt:c": "text-transform:capitalize;",
+ "tt:u": "text-transform:uppercase;",
+ "tt:l": "text-transform:lowercase;",
+ "tw": "text-wrap:|;",
+ "tw:n": "text-wrap:normal;",
+ "tw:no": "text-wrap:none;",
+ "tw:u": "text-wrap:unrestricted;",
+ "tw:s": "text-wrap:suppress;",
+ "tsh": "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};",
+ "tsh:r": "text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});",
+ "tsh:ra": "text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});",
+ "tsh+": "text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};",
+ "tsh:n": "text-shadow:none;",
+ "trf": "transform:|;",
+ "trf:skx": "transform: skewX(${1:angle});",
+ "trf:sky": "transform: skewY(${1:angle});",
+ "trf:sc": "transform: scale(${1:x}, ${2:y});",
+ "trf:scx": "transform: scaleX(${1:x});",
+ "trf:scy": "transform: scaleY(${1:y});",
+ "trf:r": "transform: rotate(${1:angle});",
+ "trf:t": "transform: translate(${1:x}, ${2:y});",
+ "trf:tx": "transform: translateX(${1:x});",
+ "trf:ty": "transform: translateY(${1:y});",
+ "trfo": "transform-origin:|;",
+ "trfs": "transform-style:${1:preserve-3d};",
+ "trs": "transition:${1:prop} ${2:time};",
+ "trsde": "transition-delay:${1:time};",
+ "trsdu": "transition-duration:${1:time};",
+ "trsp": "transition-property:${1:prop};",
+ "trstf": "transition-timing-function:${1:tfunc};",
+ "lh": "line-height:|;",
+ "whs": "white-space:|;",
+ "whs:n": "white-space:normal;",
+ "whs:p": "white-space:pre;",
+ "whs:nw": "white-space:nowrap;",
+ "whs:pw": "white-space:pre-wrap;",
+ "whs:pl": "white-space:pre-line;",
+ "whsc": "white-space-collapse:|;",
+ "whsc:n": "white-space-collapse:normal;",
+ "whsc:k": "white-space-collapse:keep-all;",
+ "whsc:l": "white-space-collapse:loose;",
+ "whsc:bs": "white-space-collapse:break-strict;",
+ "whsc:ba": "white-space-collapse:break-all;",
+ "wob": "word-break:|;",
+ "wob:n": "word-break:normal;",
+ "wob:k": "word-break:keep-all;",
+ "wob:l": "word-break:loose;",
+ "wob:bs": "word-break:break-strict;",
+ "wob:ba": "word-break:break-all;",
+ "wos": "word-spacing:|;",
+ "wow": "word-wrap:|;",
+ "wow:nm": "word-wrap:normal;",
+ "wow:n": "word-wrap:none;",
+ "wow:u": "word-wrap:unrestricted;",
+ "wow:s": "word-wrap:suppress;",
+ "lts": "letter-spacing:|;",
+ "f": "font:|;",
+ "f+": "font:${1:1em} ${2:Arial,sans-serif};",
+ "fw": "font-weight:|;",
+ "fw:n": "font-weight:normal;",
+ "fw:b": "font-weight:bold;",
+ "fw:br": "font-weight:bolder;",
+ "fw:lr": "font-weight:lighter;",
+ "fs": "font-style:${1:italic};",
+ "fs:n": "font-style:normal;",
+ "fs:i": "font-style:italic;",
+ "fs:o": "font-style:oblique;",
+ "fv": "font-variant:|;",
+ "fv:n": "font-variant:normal;",
+ "fv:sc": "font-variant:small-caps;",
+ "fz": "font-size:|;",
+ "fza": "font-size-adjust:|;",
+ "fza:n": "font-size-adjust:none;",
+ "ff": "font-family:|;",
+ "ff:s": "font-family:serif;",
+ "ff:ss": "font-family:sans-serif;",
+ "ff:c": "font-family:cursive;",
+ "ff:f": "font-family:fantasy;",
+ "ff:m": "font-family:monospace;",
+ "fef": "font-effect:|;",
+ "fef:n": "font-effect:none;",
+ "fef:eg": "font-effect:engrave;",
+ "fef:eb": "font-effect:emboss;",
+ "fef:o": "font-effect:outline;",
+ "fem": "font-emphasize:|;",
+ "femp": "font-emphasize-position:|;",
+ "femp:b": "font-emphasize-position:before;",
+ "femp:a": "font-emphasize-position:after;",
+ "fems": "font-emphasize-style:|;",
+ "fems:n": "font-emphasize-style:none;",
+ "fems:ac": "font-emphasize-style:accent;",
+ "fems:dt": "font-emphasize-style:dot;",
+ "fems:c": "font-emphasize-style:circle;",
+ "fems:ds": "font-emphasize-style:disc;",
+ "fsm": "font-smooth:|;",
+ "fsm:a": "font-smooth:auto;",
+ "fsm:n": "font-smooth:never;",
+ "fsm:aw": "font-smooth:always;",
+ "fst": "font-stretch:|;",
+ "fst:n": "font-stretch:normal;",
+ "fst:uc": "font-stretch:ultra-condensed;",
+ "fst:ec": "font-stretch:extra-condensed;",
+ "fst:c": "font-stretch:condensed;",
+ "fst:sc": "font-stretch:semi-condensed;",
+ "fst:se": "font-stretch:semi-expanded;",
+ "fst:e": "font-stretch:expanded;",
+ "fst:ee": "font-stretch:extra-expanded;",
+ "fst:ue": "font-stretch:ultra-expanded;",
+ "op": "opacity:|;",
+ "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);",
+ "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",
+ "rsz": "resize:|;",
+ "rsz:n": "resize:none;",
+ "rsz:b": "resize:both;",
+ "rsz:h": "resize:horizontal;",
+ "rsz:v": "resize:vertical;",
+ "cur": "cursor:${1:pointer};",
+ "cur:a": "cursor:auto;",
+ "cur:d": "cursor:default;",
+ "cur:c": "cursor:crosshair;",
+ "cur:ha": "cursor:hand;",
+ "cur:he": "cursor:help;",
+ "cur:m": "cursor:move;",
+ "cur:p": "cursor:pointer;",
+ "cur:t": "cursor:text;",
+ "pgbb": "page-break-before:|;",
+ "pgbb:au": "page-break-before:auto;",
+ "pgbb:al": "page-break-before:always;",
+ "pgbb:l": "page-break-before:left;",
+ "pgbb:r": "page-break-before:right;",
+ "pgbi": "page-break-inside:|;",
+ "pgbi:au": "page-break-inside:auto;",
+ "pgbi:av": "page-break-inside:avoid;",
+ "pgba": "page-break-after:|;",
+ "pgba:au": "page-break-after:auto;",
+ "pgba:al": "page-break-after:always;",
+ "pgba:l": "page-break-after:left;",
+ "pgba:r": "page-break-after:right;",
+ "orp": "orphans:|;",
+ "us": "user-select:${1:none};",
+ "wid": "widows:|;",
+ "wfsm": "-webkit-font-smoothing:${1:antialiased};",
+ "wfsm:a": "-webkit-font-smoothing:antialiased;",
+ "wfsm:s": "-webkit-font-smoothing:subpixel-antialiased;",
+ "wfsm:sa": "-webkit-font-smoothing:subpixel-antialiased;",
+ "wfsm:n": "-webkit-font-smoothing:none;"
+ }
+ },
+
+ "html": {
+
+ "snippets": {
+ "!!!": "<!doctype html>",
+ "!!!4t": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+ "!!!4s": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">",
+ "!!!xt": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
+ "!!!xs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">",
+ "!!!xxs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">",
+ "cc:ie6": "<!--[if lte IE 6]>\n\t${child}\n<![endif]-->",
+ "cc:ie": "<!--[if IE]>\n\t${child}\n<![endif]-->",
+ "cc:noie": "<!--[if !IE]><!-->\n\t${child}\n<!--<![endif]-->"
+ },
+
+ "aliases": {
+ "a:link": "a href=http://",
+ "a:mail": "a href=mailto:",
+ "bdo:r": "bdo dir=rtl",
+ "bdo:l": "bdo dir=ltr",
+ "link:css": "link rel=stylesheet href=style.css",
+ "link:print": "link rel=stylesheet href=print.css media=print",
+ "link:favicon": "link icon rel=shortcut type=image/x-icon href=favicon.ico",
+ "link:touch": "link rel=apple-touch-icon href=favicon.png",
+ "link:rss": "link rel=alternate type=application/rss+xml title=RSS href=rss.xml",
+ "link:atom": "link rel=alternate type=\"application/atom+xml\" title=Atom href=atom.xml",
+ "meta:utf": "meta http-equiv=Content-Type content=\"text/html;charset=UTF-8\"",
+ "meta:win": "meta http-equiv=Content-Type content=\"text/html;charset=windows-1251\"",
+ "meta:vp": "meta name=viewport content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\"",
+ "meta:compat": "meta http-equiv=X-UA-Compatible content=\"IE=edge,chrome=1\"",
+ "script:src": "script src",
+ "area:d": "area shape=default href alt",
+ "area:c": "area shape=circle coords href alt",
+ "area:r": "area shape=rect coords href alt",
+ "area:p": "area shape=poly coords href alt",
+ "form:get": "form action method=get",
+ "form:post": "form action method=post",
+ "input:text": "input",
+ "input:t": "input",
+ "input:hidden": "input type=hidden",
+ "input:h": "input:hidden",
+ "input:search": "input type=search",
+ "input:email": "input type=email",
+ "input:url": "input type=url",
+ "input:password": "input type=password",
+ "input:p": "input:password",
+ "input:datetime": "input type=datetime",
+ "input:date": "input type=date",
+ "input:datetime-local": "input type=datetime-local",
+ "input:month": "input type=month",
+ "input:week": "input type=week",
+ "input:time": "input type=time",
+ "input:number": "input type=number",
+ "input:color": "input type=color",
+ "input:checkbox": "input type=checkbox",
+ "input:c": "input:checkbox",
+ "input:radio": "input type=radio",
+ "input:r": "input:radio",
+ "input:range": "input type=range",
+ "input:file": "input type=file",
+ "input:f": "input:file",
+ "input:submit": "input type=submit",
+ "input:s": "input:submit",
+ "input:image": "input type=image src alt",
+ "input:i": "input:image",
+ "input:button": "input type=button",
+ "input:b": "input:button",
+ "input:reset": "input type=reset",
+ "menu:context": "menu type=context",
+ "menu:c": "menu:context",
+ "menu:toolbar": "menu type=toolbar",
+ "menu:t": "menu:toolbar",
+ "html:xml": "html xmlns=http://www.w3.org/1999/xhtml",
+
+ "bq": "blockquote",
+ "acr": "acronym",
+ "fig": "figure",
+ "figc": "figcaption",
+ "ifr": "iframe",
+ "emb": "embed",
+ "obj": "object",
+ "src": "source",
+ "cap": "caption",
+ "colg": "colgroup",
+ "fst": "fieldset",
+ "btn": "button",
+ "btn:b": "button type=button",
+ "btn:r": "button type=reset",
+ "btn:s": "button type=submit",
+ "optg": "optgroup",
+ "opt": "option",
+ "tarea": "textarea",
+ "leg": "legend",
+ "sect": "section",
+ "art": "article",
+ "hdr": "header",
+ "ftr": "footer",
+ "adr": "address",
+ "dlg": "dialog",
+ "str": "strong",
+ "prog": "progress",
+ "fset": "fieldset",
+ "datag": "datagrid",
+ "datal": "datalist",
+ "kg": "keygen",
+ "out": "output",
+ "det": "details",
+ "cmd": "command",
+ "doc": "html>(head>meta charset=UTF-8+title{Document})+body",
+ "doc4": "html>(head>meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"+title{Document})",
+
+ "!": "html:5",
+ "html:4t": "!!!4t+doc4 lang=en",
+ "html:4s": "!!!4s+doc4 lang=en",
+ "html:xt": "!!!xt+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en",
+ "html:xs": "!!!xs+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en",
+ "html:xxs": "!!!xxs+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en",
+ "html:5": "!!!+doc lang=en",
+
+ "ol+": "ol>li",
+ "ul+": "ul>li",
+ "dl+": "dl>dt+dd",
+ "map+": "map>area",
+ "table+": "table>tr>td",
+ "colgroup+": "colgroup>col",
+ "colg+": "colgroup>col",
+ "tr+": "tr>td",
+ "select+": "select>option",
+ "optgroup+": "optgroup>option",
+ "optg+": "optgroup>option"
+ }
+ }
+}
diff --git a/src/comments.el b/src/comments.el
new file mode 100644
index 0000000..de22368
--- /dev/null
+++ b/src/comments.el
@@ -0,0 +1,62 @@
+;;; zencoding-mode.el --- Unfold CSS-selector-like expressions to markup
+
+;; Copyright (C) 2009, Chris Done
+
+;; Version: 0.5.1
+;; Author: Chris Done <chrisdone@gmail.com>
+;; URL: https://github.com/rooney/zencoding
+;; Last-Updated: 2011-12-31 Sat
+;; Keywords: convenience
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+;;
+;; This file 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 General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;; Unfold CSS-selector-like expressions to markup. Intended to be used
+;; with sgml-like languages; xml, html, xhtml, xsl, etc.
+;;
+;; See `zencoding-mode' for more information.
+;;
+;; Copy zencoding-mode.el to your load-path and add to your .emacs:
+;;
+;; (require 'zencoding-mode)
+;;
+;; Example setup:
+;;
+;; (add-to-list 'load-path "~/Emacs/zencoding/")
+;; (require 'zencoding-mode)
+;; (add-hook 'sgml-mode-hook 'zencoding-mode) ;; Auto-start on any markup modes
+;; (add-hook 'html-mode-hook 'zencoding-mode)
+;; (add-hook 'css-mode-hook 'zencoding-mode)
+;;
+;; Enable the minor mode with M-x zencoding-mode.
+;;
+;; See ``Test cases'' section for a complete set of expression types.
+;;
+;; If you are hacking on this project, eval (zencoding-test-cases) to
+;; ensure that your changes have not broken anything. Feel free to add
+;; new test cases if you add new features.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; History:
+;;
+;; Modified by Lennart Borgman.
+;;
+;;
+
diff --git a/src/css-abbrev.el b/src/css-abbrev.el
new file mode 100644
index 0000000..4c357d6
--- /dev/null
+++ b/src/css-abbrev.el
@@ -0,0 +1,268 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; CSS abbrev:
+
+(zencoding-defparameter
+ zencoding-css-unit-aliases
+ (gethash "unitAliases" (gethash "css" zencoding-preferences)))
+(defun zencoding-css-arg-number (input)
+ (zencoding-parse
+ " *\\(\\(?:-\\|\\)[0-9.]+\\)\\(-\\|[A-Za-z]*\\)" 3 "css number arguments"
+ (cons (list (elt it 1)
+ (let ((unit (elt it 2)))
+ (if (= (length unit) 0)
+ (if (find ?. (elt it 1)) "em" "px")
+ (gethash unit zencoding-css-unit-aliases unit))))
+ input)))
+
+(zencoding-defparameter
+ zencoding-css-color-shorten-if-possible
+ (gethash "shortenIfPossible" (gethash "color" (gethash "css" zencoding-preferences))))
+(zencoding-defparameter
+ zencoding-css-color-case
+ (gethash "case" (gethash "color" (gethash "css" zencoding-preferences))))
+(zencoding-defparameter
+ zencoding-css-color-trailing-aliases
+ (gethash "trailingAliases" (gethash "color" (gethash "css" zencoding-preferences))))
+(defun zencoding-css-arg-color (input)
+ (zencoding-parse
+ (concat " *#\\([0-9a-fA-F]\\{1,6\\}\\)\\(rgb\\|\\)\\(["
+ (zencoding-join-string
+ (zencoding-get-keys-of-hash zencoding-css-color-trailing-aliases) "")
+ "]\\|\\)")
+ 4 "css color argument"
+ (let ((color
+ (let* ((n (elt it 1))
+ (l (length n)))
+ (substring
+ (cond ((= l 1) (concat (make-list 6 (string-to-char n))))
+ ((= l 2) (concat n n n))
+ ((= l 3) (concat
+ (loop for c in (string-to-list n)
+ append (list c c))))
+ (t (concat n n)))
+ 0 6))))
+ (cons
+ (let ((rgb-mode (string= (elt it 2) "rgb")))
+ (if rgb-mode
+ (format "rgb(%d,%d,%d)"
+ (string-to-int (substring color 0 2) 16)
+ (string-to-int (substring color 2 4) 16)
+ (string-to-int (substring color 4 6) 16))
+ (concat
+ "#"
+ (let ((filter (cond ((string= zencoding-css-color-case "auto") #'identity)
+ ((string= zencoding-css-color-case "up") #'upcase)
+ (t #'downcase))))
+ (funcall
+ filter
+ (if (and zencoding-css-color-shorten-if-possible
+ (eql (aref color 0) (aref color 1))
+ (eql (aref color 2) (aref color 3))
+ (eql (aref color 4) (aref color 5)))
+ (concat (mapcar #'(lambda (i) (aref color i)) '(0 2 4)))
+ color))))))
+ (if (< 0 (length (elt it 3)))
+ (cons (gethash (elt it 3) zencoding-css-color-trailing-aliases) input)
+ input)))))
+
+(defun zencoding-css-arg-something (input)
+ (zencoding-parse
+ " *\\([^ ]+\\)" 2 "css argument"
+ (cons (elt it 1) input)))
+
+(defun zencoding-css-parse-arg (input)
+ (zencoding-run zencoding-css-arg-number it
+ (zencoding-run zencoding-css-arg-color it
+ (zencoding-run zencoding-css-arg-something it
+ (if (equal input "")
+ it
+ (cons input ""))))))
+
+(defun zencoding-css-important-p (input)
+ (let ((len (length input)))
+ (and (< 0 len)
+ (char-equal (aref input (1- len)) ?!))))
+
+(defun zencoding-css-parse-args (args)
+ (when args
+ (let ((rt nil))
+ (loop
+ (zencoding-pif
+ (zencoding-css-parse-arg args)
+ (loop for i on it do (push (car i) rt)
+ while (consp (cdr i))
+ finally (setq args (cdr i)))
+ (return (nreverse rt)))))))
+
+(defun zencoding-css-split-args (exp)
+ (zencoding-aif
+ (string-match "\\(?:[ #0-9$]\\|-[0-9]\\)" exp)
+ (list (substring exp 0 it) (substring exp it))
+ (list exp nil)))
+
+(defun zencoding-css-split-vendor-prefixes (input)
+ (zencoding-parse
+ "\\(-[wmso]+-\\|-\\|\\)\\(.*\\)" 3 "css vendor prefixes"
+ (list (elt it 2)
+ (let ((vp (elt it 1)))
+ (if (not (string= vp ""))
+ (if (string= vp "-") 'auto
+ (string-to-list (subseq vp 1 -1))))))))
+
+(defun zencoding-css-subexpr (exp)
+ (let* ((importantp (zencoding-css-important-p exp)))
+ (destructuring-bind (exp vp)
+ (zencoding-css-split-vendor-prefixes exp)
+ (destructuring-bind (key args)
+ (zencoding-css-split-args (if importantp (subseq exp 0 -1) exp))
+ `(,key ,vp
+ ,importantp
+ ,@(zencoding-css-parse-args args))))))
+
+(defun zencoding-css-toknize (str)
+ (let* ((i (split-string str "+"))
+ (rt nil))
+ (loop
+ (let ((f (first i))
+ (s (second i)))
+ (if f
+ (if (and s (or (string= s "")
+ (string-match "^\\(?:[ #0-9$]\\|-[0-9]\\)" s)))
+ (progn
+ (setf rt (cons (concat f "+" s) rt))
+ (setf i (cddr i)))
+ (progn
+ (setf rt (cons f rt))
+ (setf i (cdr i))))
+ (return (nreverse rt)))))))
+
+(defun zencoding-css-expr (input)
+ (mapcar #'zencoding-css-subexpr
+ (zencoding-css-toknize input)))
+
+(zencoding-defparameter
+ zencoding-css-snippets
+ (gethash "snippets" (gethash "css" zencoding-snippets)))
+
+(zencoding-defparameter
+ zencoding-css-unitless-properties
+ (gethash "unitlessProperties" (gethash "css" zencoding-preferences)))
+
+(zencoding-defparameter
+ zencoding-css-unitless-properties-regex
+ (concat "^\\(:?" (zencoding-join-string
+ zencoding-css-unitless-properties "\\|")
+ "\\):.*$"))
+
+(defun zencoding-css-instantiate-lambda (str)
+ (flet ((insert-space-between-name-and-body
+ (str)
+ (if (string-match "^\\([a-z-]+:\\)\\(.+\\)$" str)
+ (zencoding-join-string
+ (mapcar (lambda (ref) (match-string ref str)) '(1 2)) " ")
+ str))
+ (split-string-to-body
+ (str args-sym)
+ (let ((rt '(concat)) (idx-max 0))
+ (loop for i from 0 to 255 do
+ (zencoding-aif
+ (string-match "\\(?:|\\|${\\(?:\\([0-9]\\)\\|\\)\\(?::\\(.+?\\)\\|\\)}\\)" str)
+ (destructuring-bind (mat idx def)
+ (mapcar (lambda (ref) (match-string ref str)) '(0 1 2))
+ (setf rt
+ `((or
+ (nth ,(let ((cur-idx (if idx (1- (string-to-int idx)) i)))
+ (setf idx-max (max cur-idx idx-max)))
+ ,args-sym)
+ ,(or def ""))
+ ,(substring str 0 it) ;; ordered to reverse
+ ,@rt))
+ (setf str (substring str (+ it (length mat)))))
+ ;; don't use nreverse. cause bug in emacs-lisp.
+ (return (cons idx-max (reverse (cons str rt)))))))))
+ (let ((args (gensym))
+ (str (insert-space-between-name-and-body str)))
+ (destructuring-bind (idx-max . body) (split-string-to-body str args)
+ (eval
+ `(lambda (&rest ,args)
+ (progn
+ (when (nthcdr ,idx-max ,args)
+ (setf (nthcdr ,idx-max ,args)
+ (list (zencoding-join-string
+ (nthcdr ,idx-max ,args) " "))))
+ ,body)))))))
+
+(zencoding-defparameter
+ zencoding-vendor-prefixes-properties
+ (gethash "vendorPrefixesProperties" (gethash "css" zencoding-preferences)))
+(zencoding-defparameter
+ zencoding-vendor-prefixes-default
+ (list "webkit" "moz" "ms" "o"))
+(defun zencoding-css-transform-vendor-prefixes (line vp)
+ (let ((key (subseq line 0 (or (position ?: line) (length line)))))
+ (let ((vps (if (eql vp 'auto)
+ (gethash key
+ zencoding-vendor-prefixes-properties
+ zencoding-vendor-prefixes-default)
+ (mapcar (lambda (v)
+ (cond ((= v ?w) "webkit")
+ ((= v ?m) "moz")
+ ((= v ?s) "ms")
+ ((= v ?o) "o")))
+ vp))))
+ (zencoding-join-string
+ (append (mapcar (lambda (v) (concat "-" v "-" line)) vps)
+ (list line))
+ "\n"))))
+
+(defun zencoding-css-transform-exprs (exprs)
+ (zencoding-join-string
+ (mapcar
+ #'(lambda (expr)
+ (let ((basement
+ (zencoding-aif
+ (gethash (car expr) zencoding-css-snippets)
+ (let ((set it) (fn nil) (unitlessp nil))
+ (if (stringp set)
+ (progn
+ ;; new pattern
+ ;; creating print function
+ (setf fn (zencoding-css-instantiate-lambda set))
+ ;; get unitless or no
+ (setf unitlessp
+ (not (null (string-match
+ zencoding-css-unitless-properties-regex set))))
+ ;; caching
+ (puthash (car expr) (cons fn unitlessp) zencoding-css-snippets))
+ (progn
+ ;; cache hit.
+ (setf fn (car set))
+ (setf unitlessp (cdr set))))
+ (apply fn
+ (mapcar
+ #'(lambda (arg)
+ (if (listp arg)
+ (if unitlessp (car arg)
+ (apply #'concat arg))
+ arg))
+ (cdddr expr))))
+ (concat (car expr) ": "
+ (zencoding-join-string
+ (mapcar #'(lambda (arg)
+ (if (listp arg) (apply #'concat arg) arg))
+ (cdddr expr)) " ")
+ ";"))))
+ (let ((line
+ (if (caddr expr)
+ (concat (subseq basement 0 -1) " !important;")
+ basement)))
+ (zencoding-aif
+ (cadr expr)
+ (zencoding-css-transform-vendor-prefixes line it)
+ line))))
+ exprs)
+ "\n"))
+
+(defun zencoding-css-transform (input)
+ (zencoding-css-transform-exprs (zencoding-css-expr input))) \ No newline at end of file
diff --git a/src/html-abbrev.el b/src/html-abbrev.el
new file mode 100644
index 0000000..ed004a2
--- /dev/null
+++ b/src/html-abbrev.el
@@ -0,0 +1,660 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; XML abbrev
+
+(zencoding-defparameter
+ zencoding-tag-aliases-table
+ (gethash "aliases" (gethash "html" zencoding-snippets)))
+
+(defun zencoding-expr (input)
+ "Parse a zen coding expression with optional filters."
+ (zencoding-pif (zencoding-parse "\\(.*?\\)|" 2 "expr|filter" it)
+ (let ((input (elt it 1))
+ (filters (elt it 2)))
+ (zencoding-pif (zencoding-extract-filters filters)
+ (zencoding-filter input it)
+ it))
+ (zencoding-filter input (zencoding-default-filter))))
+
+(defun zencoding-subexpr (input)
+ "Parse a zen coding expression with no filter. This pretty much defines precedence."
+ (zencoding-run zencoding-siblings
+ it
+ (zencoding-run zencoding-parent-child
+ it
+ (zencoding-run zencoding-multiplier
+ it
+ (zencoding-run zencoding-pexpr
+ it
+ (zencoding-run zencoding-text
+ it
+ (zencoding-run zencoding-tag
+ it
+ '(error "no match, expecting ( or a-zA-Z0-9"))))))))
+
+(defun zencoding-extract-filters (input)
+ "Extract filters from expression."
+ (zencoding-pif (zencoding-parse "\\([^\\|]+?\\)|" 2 "" it)
+ (let ((filter-name (elt it 1))
+ (more-filters (elt it 2)))
+ (zencoding-pif (zencoding-extract-filters more-filters)
+ (cons filter-name it)
+ it))
+ (zencoding-parse "\\([^\\|]+\\)" 1 "filter name" `(,(elt it 1)))))
+
+(defun zencoding-filter (input filters)
+ "Construct AST with specified filters."
+ (zencoding-pif (zencoding-subexpr input)
+ (let ((result (car it))
+ (rest (cdr it)))
+ `((filter ,filters ,result) . ,rest))
+ it))
+
+(defun zencoding-default-filter ()
+ "Default filter(s) to be used if none is specified."
+ (let* ((file-ext (car (zencoding-regex ".*\\(\\..*\\)" (or (buffer-file-name) "") 1)))
+ (defaults '(".html" ("html")
+ ".htm" ("html")
+ ".haml" ("haml")
+ ".clj" ("hic")))
+ (default-else '("html"))
+ (selected-default (member file-ext defaults)))
+ (if selected-default
+ (cadr selected-default)
+ default-else)))
+
+(defun zencoding-numbering (input)
+ (zencoding-parse
+ "\\(\\$+\\)" 2 "numbering, $"
+ (let ((doller (elt it 1)))
+ (zencoding-pif (zencoding-parse
+ "@\\([0-9-][0-9]*\\)" 2 "numbering args"
+ (let* ((args (read (elt it 1)))
+ (direction (not (or (eq '- args) (minusp args))))
+ (base (if (eq '- args) 1 (abs args))))
+ `((n ,(length doller) ,direction ,base) . ,input)))
+ it
+ `((n ,(length doller) t 1) . ,input)))))
+
+(defun zencoding-split-numbering-expressions (input)
+ (labels
+ ((iter (input)
+ (zencoding-aif (zencoding-regex "\\([^$]*\\)\\(\\$.*\\)" input '(1 2))
+ (let ((prefix (car it))
+ (input (cadr it)))
+ (if (and (< 0 (length prefix)) ; check if ..\\$... or ...$...
+ (string-equal (substring prefix -1) "\\"))
+ `(,(store-substring prefix (- (length prefix) 1) ?$)
+ ,@(iter (substring input 1)))
+ (let ((res (zencoding-numbering input)))
+ `(,prefix ,(car res) ,@(iter (cdr res))))))
+ (list input))))
+ (let ((res (iter input)))
+ (if (every #'stringp res)
+ (apply #'concat res)
+ `(numberings ,@res)))))
+
+(defun zencoding-instantiate-numbering-expression (i lim exp)
+ (labels ((instantiate
+ (i lim exps)
+ (apply #'concat
+ (mapcar
+ (lambda (exp)
+ (if (listp exp)
+ (let ((digits (second exp))
+ (direction (third exp))
+ (base (fourth exp)))
+ (let ((num (if direction (+ base i)
+ (- (+ lim (- base 1)) i))))
+ (format (concat "%0" (format "%d" digits) "d") num)))
+ exp)) exps)))
+ (search
+ (i lim exp)
+ (if (listp exp)
+ (if (eql (car exp) 'numberings)
+ (instantiate i lim (cdr exp))
+ ;; Should do like this for real searching.
+ ;; But stack overflow occurs.
+ ;; (cons (search-numberings i lim (car exp))
+ ;; (search-numberings i lim (cdr exp)))
+ (mapcar (lambda (exp) (search i lim exp)) exp))
+ exp)))
+ (search i lim exp)))
+
+(defun zencoding-multiply-expression (multiplicand exp)
+ (loop for i to (- multiplicand 1) collect
+ (zencoding-instantiate-numbering-expression i multiplicand exp)))
+
+(defun zencoding-multiplier (input)
+ (zencoding-pif (zencoding-run zencoding-pexpr
+ it
+ (zencoding-run zencoding-tag
+ it
+ (zencoding-run zencoding-text
+ it
+ '(error "expected *n multiplier"))))
+ (let* ((expr (car it)) (input (cdr it))
+ (multiplier expr))
+ (zencoding-parse "\\*\\([0-9]+\\)" 2 "*n where n is a number"
+ (let ((multiplicand (read (elt it 1))))
+ `((list ,(zencoding-multiply-expression
+ multiplicand
+ multiplier)) . ,input))))))
+
+(defun zencoding-tag (input)
+ "Parse a tag."
+ (zencoding-run
+ zencoding-tagname
+ (let ((tagname (cadr expr))
+ (has-body? (cddr expr)))
+ (zencoding-pif
+ (zencoding-run zencoding-identifier
+ (zencoding-tag-classes
+ `(tag (,tagname ,has-body? ,(cddr expr))) input)
+ (zencoding-tag-classes
+ `(tag (,tagname ,has-body? nil)) input))
+ (let ((tag-data (cadar it)) (input (cdr it)))
+ (zencoding-pif (zencoding-run
+ zencoding-props
+ (let ((props (cdr expr)))
+ `((tag ,(append tag-data (list props))) . ,input))
+ `((tag ,(append tag-data '(nil))) . ,input))
+ (let ((expr (car it)) (input (cdr it)))
+ (destructuring-bind (expr . input)
+ (zencoding-tag-text expr input)
+ (zencoding-expand-tag-alias expr input)))))))
+ (zencoding-default-tag input)))
+
+(defun zencoding-get-first-tag (expr)
+ (if (listp expr)
+ (if (listp (car expr))
+ (zencoding-get-first-tag (car expr))
+ (if (eql (car expr) 'tag)
+ expr
+ (zencoding-get-first-tag (cdr expr))))
+ nil))
+
+(defun zencoding-expand-tag-alias (tag input)
+ (let ((tag-data (cadr tag)))
+ (let ((tag-name (car tag-data)))
+ (zencoding-aif
+ (gethash tag-name zencoding-tag-aliases-table)
+ (let ((expr (if (stringp it)
+ (zencoding-subexpr it)
+ it)))
+ (prog1
+ (let ((rt (copy-tree expr)))
+ (let ((first-tag-data (cadr (zencoding-get-first-tag rt))))
+ (setf (second first-tag-data) (second tag-data))
+ (setf (third first-tag-data) (third tag-data))
+ (setf (fourth first-tag-data)
+ (remove-duplicates
+ (append (fourth first-tag-data)
+ (fourth tag-data)) :test #'string=))
+ (setf (fifth first-tag-data)
+ (remove-duplicates
+ (append (fifth first-tag-data)
+ (fifth tag-data))
+ :test #'(lambda (p1 p2)
+ (eql (car p1) (car p2)))))
+ (setf (sixth first-tag-data) (sixth tag-data))
+ (setf (cdr rt) (concat (cdr rt) input))
+ rt))
+ (puthash tag-name expr zencoding-tag-aliases-table)))
+ `(,tag . ,input)))))
+
+(defun zencoding-default-tag (input)
+ "Parse a #id or .class"
+ (zencoding-parse "\\([#|\\.]\\)" 1 "tagname"
+ (zencoding-tag (concat "div" (elt it 0)))))
+
+(defun zencoding-tag-text (tag input)
+ (let ((tag-data (cadr tag)))
+ (zencoding-run zencoding-text
+ (let ((txt (cadr expr)))
+ `((tag ,(append tag-data (list txt))) . ,input))
+ `((tag ,(append tag-data '(nil))) . ,input))))
+
+(defun zencoding-tag-props (tag input)
+ (let ((tag-data (cadr tag)))
+ (zencoding-run zencoding-props
+ (let ((props (cdr expr)))
+ `((tag ,(append tag-data (list props))) . ,input))
+ `((tag ,(append tag-data '(nil))) . ,input))))
+
+(defun zencoding-props (input)
+ "Parse many props."
+ (zencoding-run zencoding-prop
+ (zencoding-pif (zencoding-props input)
+ `((props . ,(cons expr (cdar it))) . ,(cdr it))
+ `((props . ,(list expr)) . ,input))))
+
+(defun zencoding-prop (input)
+ (zencoding-parse
+ " " 1 "space"
+ (zencoding-run
+ zencoding-name
+ (let ((name (cdr expr)))
+ (zencoding-pif (zencoding-prop-value name input)
+ it
+ `((,(read name) "") . ,input))))))
+
+(defun zencoding-prop-value (name input)
+ (zencoding-pif (zencoding-parse "=\"\\(.*?\\)\"" 2
+ "=\"property value\""
+ (let ((value (elt it 1))
+ (input (elt it 2)))
+ `((,(read name) ,value) . ,input)))
+ it
+ (zencoding-parse "=\\([^\\,\\+\\>\\{\\}\\ )]*\\)" 2
+ "=property value"
+ (let ((value (elt it 1))
+ (input (elt it 2)))
+ `((,(read name) ,value) . ,input)))))
+
+(defun zencoding-tag-classes (tag input)
+ (let ((tag-data (cadr tag)))
+ (zencoding-run zencoding-classes
+ (let ((classes (mapcar (lambda (cls) (cdadr cls))
+ (cdr expr))))
+ `((tag ,(append tag-data (list classes))) . ,input))
+ `((tag ,(append tag-data '(nil))) . ,input))))
+
+(defun zencoding-tagname (input)
+ "Parse a tagname a-zA-Z0-9 tagname (e.g. html/head/xsl:if/br)."
+ (zencoding-parse "\\([a-zA-Z!][a-zA-Z0-9:!$@-]*\/?\\)" 2 "tagname, a-zA-Z0-9"
+ (let* ((tag-spec (elt it 1))
+ (empty-tag (zencoding-regex "\\([^\/]*\\)\/" tag-spec 1))
+ (tag (zencoding-split-numbering-expressions
+ (if empty-tag (car empty-tag) tag-spec))))
+ `((tagname . (,tag . ,(not empty-tag))) . ,input))))
+
+(defun zencoding-text (input)
+ "A zen coding expression innertext."
+ (zencoding-parse "{\\(.*?\\)}" 2 "inner text"
+ (let ((txt (zencoding-split-numbering-expressions (elt it 1))))
+ `((text ,txt) . ,input))))
+
+(defun zencoding-pexpr (input)
+ "A zen coding expression with parentheses around it."
+ (zencoding-parse "(" 1 "("
+ (zencoding-run zencoding-subexpr
+ (zencoding-aif (zencoding-regex ")" input '(0 1))
+ `(,expr . ,(elt it 1))
+ '(error "expecting `)'")))))
+
+(defun zencoding-parent-child (input)
+ "Parse an tag>e expression, where `n' is an tag and `e' is any
+ expression."
+ (defun listing (parents child input)
+ (let ((len (length parents)))
+ `((list ,(map 'list
+ (lambda (parent i)
+ `(parent-child ,parent
+ ,(zencoding-instantiate-numbering-expression i len child)))
+ parents
+ (loop for i to (- len 1) collect i))) . ,input)))
+ (zencoding-run zencoding-multiplier
+ (let* ((items (cadr expr))
+ (rest (zencoding-child-sans expr input)))
+ (if (not (eq (car rest) 'error))
+ (let ((child (car rest))
+ (input (cdr rest)))
+
+ (zencoding-aif (zencoding-regex "^" input '(0 1))
+ (let ((input (elt it 1)))
+ (zencoding-run zencoding-subexpr
+ `((sibling ,(car (listing items child "")) ,expr) . ,input)
+ (listing items child input)))
+ (listing items child input)))
+ '(error "expected child")))
+ (zencoding-run zencoding-tag
+ (zencoding-child expr input)
+ '(error "expected parent"))))
+
+(defun zencoding-child-sans (parent input)
+ (zencoding-parse ">" 1 ">"
+ (zencoding-run zencoding-subexpr
+ it
+ '(error "expected child"))))
+
+(defun zencoding-child (parent input)
+ (zencoding-parse ">" 1 ">"
+ (zencoding-run zencoding-subexpr
+ (let ((child expr))
+ (zencoding-aif (zencoding-regex "^" input '(0 1))
+ (let ((input (elt it 1)))
+ (zencoding-run zencoding-subexpr
+ `((sibling (parent-child ,parent ,child) ,expr) . ,input)
+ `((parent-child ,parent ,child) . ,input)))
+ `((parent-child ,parent ,child) . ,input)))
+ '(error "expected child"))))
+
+(defun zencoding-sibling (input)
+ (zencoding-por zencoding-pexpr zencoding-multiplier
+ it
+ (zencoding-run zencoding-tag
+ it
+ (zencoding-run zencoding-text
+ it
+ '(error "expected sibling")))))
+
+(defun zencoding-siblings (input)
+ "Parse an e+e expression, where e is an tag or a pexpr."
+ (zencoding-run zencoding-sibling
+ (let ((parent expr))
+ (zencoding-parse
+ "\\+" 1 "+"
+ (zencoding-run
+ zencoding-subexpr
+ (let ((child expr))
+ `((sibling ,parent ,child) . ,input))
+ (zencoding-expand parent input))))
+ '(error "expected first sibling")))
+
+(defun zencoding-expand (parent input)
+ "Parse an e+ expression, where e is an expandable tag"
+ (let* ((parent-tag (car (cadr parent))))
+ (setf (caadr parent) (concat parent-tag "+"))
+ (destructuring-bind (parent . input)
+ (zencoding-expand-tag-alias parent input)
+ (zencoding-pif (zencoding-parse "+\\(.*\\)" 1 "+expr"
+ (zencoding-subexpr (elt it 1)))
+ `((sibling ,parent ,@it))
+ `(,parent . ,input)))))
+
+(defun zencoding-name (input)
+ "Parse a class or identifier name, e.g. news, footer, mainimage"
+ (zencoding-parse "\\([a-zA-Z$@][a-zA-Z0-9$@_:-]*\\)" 2 "class or identifer name"
+ `((name . ,(zencoding-split-numbering-expressions
+ (elt it 1))) . ,input)))
+
+(defun zencoding-class (input)
+ "Parse a classname expression, e.g. .foo"
+ (zencoding-parse "\\." 1 "."
+ (zencoding-run zencoding-name
+ `((class ,expr) . ,input)
+ '(error "expected class name"))))
+(defun zencoding-identifier (input)
+ "Parse an identifier expression, e.g. #foo"
+ (zencoding-parse "#" 1 "#"
+ (zencoding-run zencoding-name
+ `((identifier . ,expr) . ,input))))
+
+(defun zencoding-classes (input)
+ "Parse many classes."
+ (zencoding-run zencoding-class
+ (zencoding-pif (zencoding-classes input)
+ `((classes . ,(cons expr (cdar it))) . ,(cdr it))
+ `((classes . ,(list expr)) . ,input))
+ '(error "expected class")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Zen coding transformer from AST to string
+
+(defvar zencoding-leaf-function nil
+ "Function to execute when expanding a leaf node in the
+ Zencoding AST.")
+
+(zencoding-defparameter
+ zencoding-tag-settings-table
+ (gethash "tags" (gethash "html" zencoding-preferences)))
+
+(zencoding-defparameter
+ zencoding-tag-snippets-table
+ (gethash "snippets" (gethash "html" zencoding-snippets)))
+
+(defvar zencoding-filters
+ '("html" (zencoding-primary-filter zencoding-make-html-tag)
+ "c" (zencoding-primary-filter zencoding-make-commented-html-tag)
+ "haml" (zencoding-primary-filter zencoding-make-haml-tag)
+ "hic" (zencoding-primary-filter zencoding-make-hiccup-tag)
+ "e" (zencoding-escape-xml)))
+
+(defun zencoding-primary-filter (input proc)
+ "Process filter that needs to be executed first, ie. not given output from other filter."
+ (if (listp input)
+ (let ((tag-maker (cadr proc)))
+ (zencoding-transform-ast input tag-maker))
+ nil))
+
+(defun zencoding-process-filter (filters input)
+ "Process filters, chain one filter output as the input of the next filter."
+ (let ((filter-data (member (car filters) zencoding-filters))
+ (more-filters (cdr filters)))
+ (if filter-data
+ (let* ((proc (cadr filter-data))
+ (fun (car proc))
+ (filter-output (funcall fun input proc)))
+ (if more-filters
+ (zencoding-process-filter more-filters filter-output)
+ filter-output))
+ nil)))
+
+(defun zencoding-make-tag (tag-maker tag-info &optional content)
+ "Extract tag info and pass them to tag-maker."
+ (let* ((name (pop tag-info))
+ (has-body? (pop tag-info))
+ (id (pop tag-info))
+ (classes (pop tag-info))
+ (props (pop tag-info))
+ (txt (pop tag-info))
+ (settings (gethash name zencoding-tag-settings-table)))
+ (funcall tag-maker name has-body? id classes props txt settings
+ (if content content
+ (if zencoding-leaf-function (funcall zencoding-leaf-function))))))
+
+(defun zencoding-hash-to-list (hash &optional proc)
+ (unless proc (setq proc #'cons))
+ (loop for key being the hash-keys of hash using (hash-values val)
+ collect (funcall proc key val)))
+
+(defun zencoding-merge-tag-props (default-table tag-props)
+ (if default-table
+ (let ((tbl (copy-hash-table default-table)))
+ (loop for prop in tag-props do
+ (puthash (symbol-name (car prop)) (cadr prop) tbl))
+ (zencoding-hash-to-list tbl 'list))
+ tag-props))
+
+(defun zencoding-html-snippets-instantiate-lambda (src)
+ (let ((lines (mapcar
+ #'(lambda (src)
+ (if (string-match "^\\(.*\\)${child}\\(.*\\)$" src)
+ (mapcar (lambda (i)
+ (match-string i src))
+ '(1 2))
+ (list src)))
+ (split-string src "\n"))))
+ (labels
+ ((iter
+ (l m a b)
+ (if l
+ (if (< 1 (length (car l)))
+ (iter (cdr l)
+ 'b
+ (cons (caar l) a)
+ (cons (cadar l) b))
+ (if (eql m 'a)
+ (iter (cdr l) m (cons (caar l) a) b)
+ (iter (cdr l) m a (cons (caar l) b))))
+ (if b
+ `(lambda (contents)
+ (concat
+ ,(zencoding-join-string (reverse a) "\n")
+ contents
+ ,(zencoding-join-string (reverse b) "\n")))
+ `(lambda (contents)
+ (concat
+ ,(zencoding-join-string (reverse a) "\n")
+ contents))))))
+ (eval (iter lines 'a nil nil)))))
+
+(defun zencoding-make-html-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
+ "Create HTML markup string"
+ (zencoding-aif
+ (gethash tag-name zencoding-tag-snippets-table)
+
+ (let ((fn (if (stringp it)
+ (zencoding-html-snippets-instantiate-lambda it)
+ it)))
+ (prog1
+ (funcall fn content)
+ (puthash tag-name fn zencoding-tag-snippets-table)))
+
+ (let* ((id (zencoding-concat-or-empty " id=\"" tag-id "\""))
+ (classes (zencoding-mapconcat-or-empty " class=\"" tag-classes " " "\""))
+ (props (let* ((tag-props-default
+ (and settings (gethash "defaultAttr" settings)))
+ (merged-tag-props
+ (zencoding-merge-tag-props
+ tag-props-default
+ tag-props)))
+ (zencoding-mapconcat-or-empty
+ " " merged-tag-props " " nil
+ (lambda (prop)
+ (let ((key (car prop)))
+ (concat (if (symbolp key) (symbol-name key) key)
+ "=\"" (cadr prop) "\""))))))
+ (content-multiline? (and content (string-match "\n" content)))
+ (block-tag? (and settings (gethash "block" settings)))
+ (self-closing? (and (not (or tag-txt content))
+ (or (not tag-has-body?)
+ (and settings (gethash "selfClosing" settings)))))
+ (lf (if (or content-multiline? block-tag?) "\n")))
+ (concat "<" tag-name id classes props
+ (if self-closing? "/>"
+ (concat ">"
+ (if tag-txt
+ (if (or content-multiline? block-tag?)
+ (zencoding-indent tag-txt)
+ tag-txt))
+ (if content
+ (if (or content-multiline? block-tag?)
+ (zencoding-indent content)
+ content))
+ lf
+ "</" tag-name ">"))))))
+
+(defun zencoding-make-commented-html-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
+ "Create HTML markup string with extra comments for elements with #id or .classes"
+ (let ((body (zencoding-make-html-tag tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)))
+ (if (or tag-id tag-classes)
+ (let ((id (zencoding-concat-or-empty "#" tag-id))
+ (classes (zencoding-mapconcat-or-empty "." tag-classes ".")))
+ (concat "<!-- " id classes " -->\n"
+ body
+ "\n<!-- /" id classes " -->"))
+ body)))
+
+(defun zencoding-make-haml-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
+ "Create HAML string"
+ (let ((name (if (and (equal tag-name "div")
+ (or tag-id tag-classes))
+ ""
+ (concat "%" tag-name)))
+ (id (zencoding-concat-or-empty "#" tag-id))
+ (classes (zencoding-mapconcat-or-empty "." tag-classes "."))
+ (props (zencoding-mapconcat-or-empty
+ "{" tag-props ", " "}"
+ (lambda (prop)
+ (concat ":" (symbol-name (car prop)) " => \"" (cadr prop) "\"")))))
+ (concat name id classes props
+ (if tag-txt
+ (zencoding-indent tag-txt))
+ (if content
+ (zencoding-indent content)))))
+
+(defun zencoding-make-hiccup-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
+ "Create Hiccup string"
+ (let* ((id (zencoding-concat-or-empty "#" tag-id))
+ (classes (zencoding-mapconcat-or-empty "." tag-classes "."))
+ (props (zencoding-mapconcat-or-empty
+ " {" tag-props ", " "}"
+ (lambda (prop)
+ (concat ":" (symbol-name (car prop)) " \"" (cadr prop) "\""))))
+ (content-multiline? (and content (string-match "\n" content)))
+ (block-tag? (and settings (gethash "block" settings))))
+ (concat "[:" tag-name id classes props
+ (if tag-txt
+ (let ((tag-txt-quoted (concat "\"" tag-txt "\"")))
+ (if (or content-multiline? block-tag?)
+ (zencoding-indent tag-txt-quoted)
+ (concat " " tag-txt-quoted))))
+ (if content
+ (if (or content-multiline? block-tag?)
+ (zencoding-indent content)
+ (concat " " content)))
+ "]")))
+
+(defun zencoding-make-text (tag-maker text)
+ (cond
+ ((eq tag-maker 'zencoding-make-hiccup-tag)
+ (concat "\"" text "\""))
+ (t text)))
+
+(defun zencoding-concat-or-empty (prefix body &optional suffix)
+ "Return prefixed suffixed text or empty string."
+ (if body
+ (concat prefix body suffix)
+ ""))
+
+(defun zencoding-mapconcat-or-empty (prefix list-body delimiter &optional suffix map-fun)
+ "Return prefixed suffixed mapconcated text or empty string."
+ (if list-body
+ (let* ((mapper (if map-fun map-fun 'identity))
+ (body (mapconcat mapper list-body delimiter)))
+ (concat prefix body suffix))
+ ""))
+
+(defun zencoding-escape-xml (input proc)
+ "Escapes XML-unsafe characters: <, > and &."
+ (replace-regexp-in-string
+ "<" "&lt;"
+ (replace-regexp-in-string
+ ">" "&gt;"
+ (replace-regexp-in-string
+ "&" "&amp;"
+ (if (stringp input)
+ input
+ (zencoding-process-filter (zencoding-default-filter) input))))))
+
+(defun zencoding-html-transform (input)
+ (let ((ast (car (zencoding-expr input))))
+ (when (not (eq ast 'error))
+ (zencoding-transform-ast-with-filters ast))))
+
+(defun zencoding-transform-ast-with-filters (ast-with-filters)
+ "Transform AST (containing filter data) into string."
+ (let ((filters (cadr ast-with-filters))
+ (ast (caddr ast-with-filters)))
+ (zencoding-process-filter filters ast)))
+
+(defun zencoding-transform-ast (ast tag-maker)
+ "Transform AST (without filter data) into string."
+ (let ((type (car ast)))
+ (cond
+ ((eq type 'list)
+ (mapconcat (lexical-let ((make-tag-fun tag-maker))
+ #'(lambda (sub-ast)
+ (zencoding-transform-ast sub-ast make-tag-fun)))
+ (cadr ast)
+ "\n"))
+ ((eq type 'tag)
+ (zencoding-make-tag tag-maker (cadr ast)))
+ ((eq type 'text)
+ (zencoding-make-text tag-maker (cadr ast)))
+ ((eq type 'parent-child)
+ (let ((parent (cadadr ast))
+ (children (zencoding-transform-ast (caddr ast) tag-maker)))
+ (zencoding-make-tag tag-maker parent children)))
+ ((eq type 'sibling)
+ (let ((sib1 (zencoding-transform-ast (cadr ast) tag-maker))
+ (sib2 (zencoding-transform-ast (caddr ast) tag-maker)))
+ (concat sib1 "\n" sib2))))))
+
+(defun zencoding-indent (text)
+ "Indent the text"
+ (if text
+ (replace-regexp-in-string "\n" "\n " (concat "\n" text))
+ nil))
+
diff --git a/src/init.el b/src/init.el
new file mode 100644
index 0000000..b2fd434
--- /dev/null
+++ b/src/init.el
@@ -0,0 +1,76 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(defconst zencoding-mode:version "0.5.1")
+
+;; Include the trie data structure for caching
+;(require 'zencoding-trie)
+
+(require 'cl)
+
+(defmacro zencoding-defparameter (symbol &optional initvalue docstring)
+ `(progn
+ (defvar ,symbol nil ,docstring)
+ (setq ,symbol ,initvalue)))
+
+(defun zencoding-join-string (lis joiner)
+ (mapconcat 'identity lis joiner))
+
+(defun zencoding-get-keys-of-hash (hash)
+ (let ((ks nil))
+ (maphash #'(lambda (k v) (setq ks (cons k ks))) hash)
+ ks))
+
+(defun zencoding-get-vals-of-hash (hash)
+ (let ((vs nil))
+ (maphash #'(lambda (k v) (setq vs (cons v vs))) hash)
+ vs))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Generic parsing macros and utilities
+
+(defmacro zencoding-aif (test-form then-form &rest else-forms)
+ "Anaphoric if. Temporary variable `it' is the result of test-form."
+ `(let ((it ,test-form))
+ (if it ,then-form ,@(or else-forms '(it)))))
+
+(defmacro zencoding-pif (test-form then-form &rest else-forms)
+ "Parser anaphoric if. Temporary variable `it' is the result of test-form."
+ `(let ((it ,test-form))
+ (if (not (eq 'error (car it))) ,then-form ,@(or else-forms '(it)))))
+
+(defmacro zencoding-parse (regex nums label &rest body)
+ "Parse according to a regex and update the `input' variable."
+ `(zencoding-aif (zencoding-regex ,regex input ',(number-sequence 0 nums))
+ (let ((input (elt it ,nums)))
+ ,@body)
+ `,`(error ,(concat "expected " ,label))))
+
+(defmacro zencoding-run (parser then-form &rest else-forms)
+ "Run a parser and update the input properly, extract the parsed
+ expression."
+ `(zencoding-pif (,parser input)
+ (let ((input (cdr it))
+ (expr (car it)))
+ ,then-form)
+ ,@(or else-forms '(it))))
+
+(defmacro zencoding-por (parser1 parser2 then-form &rest else-forms)
+ "OR two parsers. Try one parser, if it fails try the next."
+ `(zencoding-pif (,parser1 input)
+ (let ((input (cdr it))
+ (expr (car it)))
+ ,then-form)
+ (zencoding-pif (,parser2 input)
+ (let ((input (cdr it))
+ (expr (car it)))
+ ,then-form)
+ ,@else-forms)))
+
+(defun zencoding-regex (regexp string refs)
+ "Return a list of (`ref') matches for a `regex' on a `string' or nil."
+ (if (string-match (concat "^" regexp "\\([^\n]*\\)$") string)
+ (mapcar (lambda (ref) (match-string ref string))
+ (if (sequencep refs) refs (list refs)))
+ nil))
diff --git a/src/mode-def.el b/src/mode-def.el
new file mode 100644
index 0000000..1f7e396
--- /dev/null
+++ b/src/mode-def.el
@@ -0,0 +1,296 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Zencoding minor mode
+
+(defgroup zencoding nil
+ "Customization group for zencoding-mode."
+ :group 'convenience)
+
+(defun zencoding-expr-on-line ()
+ "Extract a zencoding expression and the corresponding bounds
+ for the current line."
+ (let* ((start (line-beginning-position))
+ (end (line-end-position))
+ (line (buffer-substring-no-properties start end))
+ (expr (zencoding-regex "\\([ \t]*\\)\\([^\n]+\\)" line 2)))
+ (if (first expr)
+ (list (first expr) start end))))
+
+(defcustom zencoding-indentation 4
+ "Number of spaces used for indentation."
+ :type '(number :tag "Spaces")
+ :group 'zencoding)
+
+(defun zencoding-prettify (markup indent)
+ (let ((first-col (format (format "%%%ds" indent) ""))
+ (tab (format (format "%%%ds" zencoding-indentation) "")))
+ (concat first-col
+ (replace-regexp-in-string "\n" (concat "\n" first-col)
+ (replace-regexp-in-string " " tab markup)))))
+
+(defun zencoding-transform (input)
+ (if (eql major-mode 'css-mode)
+ (zencoding-css-transform input)
+ (zencoding-html-transform input)))
+
+;;;###autoload
+(defun zencoding-expand-line (arg)
+ "Replace the current line's zencode expression with the corresponding expansion.
+If prefix ARG is given or region is visible call `zencoding-preview' to start an
+interactive preview.
+
+Otherwise expand line directly.
+
+For more information see `zencoding-mode'."
+ (interactive "P")
+ (let* ((here (point))
+ (preview (if zencoding-preview-default (not arg) arg))
+ (beg (if preview
+ (progn
+ (beginning-of-line)
+ (skip-chars-forward " \t")
+ (point))
+ (when mark-active (region-beginning))))
+ (end (if preview
+ (progn
+ (end-of-line)
+ (skip-chars-backward " \t")
+ (point))
+ (when mark-active (region-end)))))
+ (if beg
+ (progn
+ (goto-char here)
+ (zencoding-preview beg end))
+ (let ((expr (zencoding-expr-on-line)))
+ (if expr
+ (let ((markup (zencoding-transform (first expr))))
+ (when markup
+ (let ((pretty (zencoding-prettify markup (current-indentation))))
+ (save-excursion
+ (delete-region (second expr) (third expr))
+ (zencoding-insert-and-flash pretty))))))))))
+
+(defvar zencoding-mode-keymap nil
+ "Keymap for zencode minor mode.")
+
+(if zencoding-mode-keymap
+ nil
+ (progn
+ (setq zencoding-mode-keymap (make-sparse-keymap))
+ (define-key zencoding-mode-keymap (kbd "C-j") 'zencoding-expand-line)
+ (define-key zencoding-mode-keymap (kbd "<C-return>") 'zencoding-expand-line)))
+
+;;;###autoload
+(define-minor-mode zencoding-mode
+ "Minor mode for writing HTML and CSS markup.
+With zen coding for HTML and CSS you can write a line like
+
+ ul#name>li.item*2
+
+and have it expanded to
+
+ <ul id=\"name\">
+ <li class=\"item\"></li>
+ <li class=\"item\"></li>
+ </ul>
+
+This minor mode defines keys for quick access:
+
+\\{zencoding-mode-keymap}
+
+Home page URL `http://www.emacswiki.org/emacs/ZenCoding'.
+
+See also `zencoding-expand-line'."
+ :lighter " Zen"
+ :keymap zencoding-mode-keymap)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Zencoding yasnippet integration
+
+(defun zencoding-transform-yas (input)
+ (let* ((leaf-count 0)
+ (zencoding-leaf-function
+ (lambda ()
+ (format "$%d" (incf leaf-count)))))
+ (zencoding-transform input)))
+
+;;;###autoload
+(defun zencoding-expand-yas ()
+ (interactive)
+ (let ((expr (zencoding-expr-on-line)))
+ (if expr
+ (let* ((markup (zencoding-transform-yas (first expr)))
+ (filled (replace-regexp-in-string "><" ">\n<" markup)))
+ (delete-region (second expr) (third expr))
+ (insert filled)
+ (indent-region (second expr) (point))
+ (yas/expand-snippet
+ (buffer-substring (second expr) (point))
+ (second expr) (point))))))
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Real-time preview
+;;
+
+;;;;;;;;;;
+;; Lennart's version
+
+(defvar zencoding-preview-input nil)
+(make-local-variable 'zencoding-preview-input)
+(defvar zencoding-preview-output nil)
+(make-local-variable 'zencoding-preview-output)
+(defvar zencoding-old-show-paren nil)
+(make-local-variable 'zencoding-old-show-paren)
+
+(defface zencoding-preview-input
+ '((default :box t :inherit secondary-selection))
+ "Face for preview input field."
+ :group 'zencoding)
+
+(defface zencoding-preview-output
+ '((default :inherit highlight))
+ "Face for preview output field."
+ :group 'zencoding)
+
+(defvar zencoding-preview-keymap
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "RET") 'zencoding-preview-accept)
+ (define-key map (kbd "<return>") 'zencoding-preview-accept)
+ (define-key map [(control ?g)] 'zencoding-preview-abort)
+ map))
+
+(defun zencoding-preview-accept ()
+ (interactive)
+ (let ((ovli zencoding-preview-input))
+ (if (not (and (overlayp ovli)
+ (bufferp (overlay-buffer ovli))))
+ (message "Preview is not active")
+ (let* ((indent (current-indentation))
+ (markup (zencoding-preview-transformed indent)))
+ (when markup
+ (delete-region (line-beginning-position) (overlay-end ovli))
+ (zencoding-insert-and-flash markup)))))
+ (zencoding-preview-abort))
+
+(defvar zencoding-flash-ovl nil)
+(make-variable-buffer-local 'zencoding-flash-ovl)
+
+(defun zencoding-remove-flash-ovl (buf)
+ (with-current-buffer buf
+ (when (overlayp zencoding-flash-ovl)
+ (delete-overlay zencoding-flash-ovl))
+ (setq zencoding-flash-ovl nil)))
+
+(defcustom zencoding-preview-default t
+ "If non-nil then preview is the default action.
+This determines how `zencoding-expand-line' works by default."
+ :type 'boolean
+ :group 'zencoding)
+
+(defcustom zencoding-insert-flash-time 0.5
+ "Time to flash insertion.
+Set this to a negative number if you do not want flashing the
+expansion after insertion."
+ :type '(number :tag "Seconds")
+ :group 'zencoding)
+
+(defun zencoding-insert-and-flash (markup)
+ (zencoding-remove-flash-ovl (current-buffer))
+ (let ((here (point)))
+ (insert markup)
+ (setq zencoding-flash-ovl (make-overlay here (point)))
+ (overlay-put zencoding-flash-ovl 'face 'zencoding-preview-output)
+ (when (< 0 zencoding-insert-flash-time)
+ (run-with-idle-timer zencoding-insert-flash-time
+ nil 'zencoding-remove-flash-ovl (current-buffer)))))
+
+;;;###autoload
+(defun zencoding-preview (beg end)
+ "Expand zencode between BEG and END interactively.
+This will show a preview of the expanded zen code and you can
+accept it or skip it."
+ (interactive (if mark-active
+ (list (region-beginning) (region-end))
+ (list nil nil)))
+ (zencoding-preview-abort)
+ (if (not beg)
+ (message "Region not active")
+ (setq zencoding-old-show-paren show-paren-mode)
+ (show-paren-mode -1)
+ (let ((here (point)))
+ (goto-char beg)
+ (forward-line 1)
+ (unless (= 0 (current-column))
+ (insert "\n"))
+ (let* ((opos (point))
+ (ovli (make-overlay beg end nil nil t))
+ (ovlo (make-overlay opos opos))
+ (info (propertize " Zen preview. Choose with RET. Cancel by stepping out. \n"
+ 'face 'tooltip)))
+ (overlay-put ovli 'face 'zencoding-preview-input)
+ (overlay-put ovli 'keymap zencoding-preview-keymap)
+ (overlay-put ovlo 'face 'zencoding-preview-output)
+ (overlay-put ovlo 'before-string info)
+ (setq zencoding-preview-input ovli)
+ (setq zencoding-preview-output ovlo)
+ (add-hook 'before-change-functions 'zencoding-preview-before-change t t)
+ (goto-char here)
+ (add-hook 'post-command-hook 'zencoding-preview-post-command t t)))))
+
+(defvar zencoding-preview-pending-abort nil)
+(make-variable-buffer-local 'zencoding-preview-pending-abort)
+
+(defun zencoding-preview-before-change (beg end)
+ (when
+ (or (> beg (overlay-end zencoding-preview-input))
+ (< beg (overlay-start zencoding-preview-input))
+ (> end (overlay-end zencoding-preview-input))
+ (< end (overlay-start zencoding-preview-input)))
+ (setq zencoding-preview-pending-abort t)))
+
+(defun zencoding-preview-abort ()
+ "Abort zen code preview."
+ (interactive)
+ (setq zencoding-preview-pending-abort nil)
+ (remove-hook 'before-change-functions 'zencoding-preview-before-change t)
+ (when (overlayp zencoding-preview-input)
+ (delete-overlay zencoding-preview-input))
+ (setq zencoding-preview-input nil)
+ (when (overlayp zencoding-preview-output)
+ (delete-overlay zencoding-preview-output))
+ (setq zencoding-preview-output nil)
+ (remove-hook 'post-command-hook 'zencoding-preview-post-command t)
+ (when zencoding-old-show-paren (show-paren-mode 1)))
+
+(defun zencoding-preview-post-command ()
+ (condition-case err
+ (zencoding-preview-post-command-1)
+ (error (message "zencoding-preview-post: %s" err))))
+
+(defun zencoding-preview-post-command-1 ()
+ (if (and (not zencoding-preview-pending-abort)
+ (<= (point) (overlay-end zencoding-preview-input))
+ (>= (point) (overlay-start zencoding-preview-input)))
+ (zencoding-update-preview (current-indentation))
+ (zencoding-preview-abort)))
+
+(defun zencoding-preview-transformed (indent)
+ (let* ((string (buffer-substring-no-properties
+ (overlay-start zencoding-preview-input)
+ (overlay-end zencoding-preview-input))))
+ (let ((output (zencoding-transform string)))
+ (when output
+ (zencoding-prettify output indent)))))
+
+(defun zencoding-update-preview (indent)
+ (let* ((pretty (zencoding-preview-transformed indent))
+ (show (when pretty
+ (propertize pretty 'face 'highlight))))
+ (when show
+ (overlay-put zencoding-preview-output 'after-string
+ (concat show "\n")))))
+
+(provide 'zencoding-mode)
+
+;;; zencoding-mode.el ends here
diff --git a/src/preferences.el b/src/preferences.el
new file mode 100644
index 0000000..a9bfc39
--- /dev/null
+++ b/src/preferences.el
@@ -0,0 +1,1548 @@
+;; src/preferences.el
+;; This file is generated from conf/preferences.json
+;; Don't edit.
+(zencoding-defparameter zencoding-preferences
+(let ((tbl (make-hash-table :test 'equal)))
+(puthash "html" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "tags" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "code" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "meter" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "tbody" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "font" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "noscript" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "style" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "img" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+(puthash "alt" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "title" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "menu" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "tt" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "tr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "param" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "name" "" tbl)
+(puthash "value" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "li" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "source" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "tfoot" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "th" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "input" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "type" "text" tbl)
+(puthash "name" "" tbl)
+(puthash "value" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "td" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dl" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "blockquote" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "fieldset" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "big" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dd" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "kbd" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "optgroup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "dt" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "wbr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "button" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "summary" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "p" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "small" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "output" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "div" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "dir" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "em" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "datalist" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "frame" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "hgroup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "meta" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "video" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "rt" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "canvas" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "rp" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "sub" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "bdo" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "dir" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "bdi" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "label" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "for" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "acronym" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "title" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "sup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "progress" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "body" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "basefont" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "base" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "href" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "br" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "address" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "article" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "strong" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "legend" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "ol" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "script" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "caption" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "s" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dialog" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "col" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h2" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h3" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h1" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h6" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h4" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h5" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "header" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "table" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "select" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "name" "" tbl)
+(puthash "id" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "noframes" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "span" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "area" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "shape" "" tbl)
+(puthash "href" "" tbl)
+(puthash "coords" "" tbl)
+(puthash "alt" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "mark" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dfn" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "strike" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "cite" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "thead" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "head" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "option" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "value" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "form" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "action" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "hr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "var" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "link" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "href" "" tbl)
+(puthash "rel" "stylesheet" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "ruby" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "b" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "colgroup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "keygen" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "ul" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "applet" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "del" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "iframe" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+(puthash "frameborder" "0" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "embed" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+(puthash "type" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "pre" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "frameset" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "figure" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "ins" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "aside" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "html" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "nav" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "details" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "u" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "samp" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "map" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "name" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "track" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "object" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "type" "" tbl)
+(puthash "data" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "figcaption" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "a" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "href" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "center" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "textarea" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "rows" "10" tbl)
+(puthash "cols" "30" tbl)
+(puthash "name" "" tbl)
+(puthash "id" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "footer" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "i" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "q" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "command" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "time" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "audio" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "section" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "abbr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "title" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+tbl) tbl)
+tbl) tbl)
+(puthash "css" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "vendorPrefixesProperties" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "text-fill-color" (vector
+"webkit"
+)
+ tbl)
+(puthash "ime-mode" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-layer" (vector
+"ms"
+)
+ tbl)
+(puthash "user-drag" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-image" (vector
+"webkit"
+)
+ tbl)
+(puthash "font-feature-settings" (vector
+"moz"
+"ms"
+)
+ tbl)
+(puthash "outline-radius-topleft" (vector
+"moz"
+)
+ tbl)
+(puthash "mask-box-image-slice" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-composite" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-underline-position" (vector
+"ms"
+)
+ tbl)
+(puthash "hyphenate-limit-chars" (vector
+"ms"
+)
+ tbl)
+(puthash "marquee-speed" (vector
+"o"
+)
+ tbl)
+(puthash "input-required" (vector
+"o"
+)
+ tbl)
+(puthash "color-correction" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-size" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-origin" (vector
+"webkit"
+)
+ tbl)
+(puthash "wrap-through" (vector
+"ms"
+)
+ tbl)
+(puthash "text-emphasis-position" (vector
+"webkit"
+)
+ tbl)
+(puthash "user-select" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "dashboard-region" (vector
+"webkit"
+"o"
+)
+ tbl)
+(puthash "accesskey" (vector
+"o"
+)
+ tbl)
+(puthash "scrollbar-track-color" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-columns" (vector
+"ms"
+)
+ tbl)
+(puthash "text-stroke-width" (vector
+"webkit"
+)
+ tbl)
+(puthash "link-source" (vector
+"o"
+)
+ tbl)
+(puthash "scrollbar-arrow-color" (vector
+"ms"
+)
+ tbl)
+(puthash "border-radius" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "text-stroke-color" (vector
+"webkit"
+)
+ tbl)
+(puthash "box-shadow" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "flow-into" (vector
+"ms"
+)
+ tbl)
+(puthash "scrollbar-highlight-color" (vector
+"ms"
+)
+ tbl)
+(puthash "border-left-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "word-wrap" (vector
+"ms"
+)
+ tbl)
+(puthash "text-emphasis-color" (vector
+"webkit"
+)
+ tbl)
+(puthash "hyphens" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "marquee-direction" (vector
+"webkit"
+)
+ tbl)
+(puthash "column-rule-width" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "box-lines" (vector
+"webkit"
+"ms"
+)
+ tbl)
+(puthash "column-break-inside" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-snap-points-x" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-row-align" (vector
+"ms"
+)
+ tbl)
+(puthash "force-broken-image-icon" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-fill-mode" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "box-line-progression" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-size" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-boundary-left" (vector
+"ms"
+)
+ tbl)
+(puthash "text-combine" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-column-align" (vector
+"ms"
+)
+ tbl)
+(puthash "perspective-origin" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "overflow-style" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-position" (vector
+"webkit"
+)
+ tbl)
+(puthash "content-zoom-chaining" (vector
+"ms"
+)
+ tbl)
+(puthash "column-span" (vector
+"webkit"
+)
+ tbl)
+(puthash "border-fit" (vector
+"webkit"
+)
+ tbl)
+(puthash "outline-radius-topright" (vector
+"moz"
+)
+ tbl)
+(puthash "tab-size" (vector
+"moz"
+"o"
+)
+ tbl)
+(puthash "layout-grid-type" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-clip" (vector
+"webkit"
+)
+ tbl)
+(puthash "column-gap" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "text-security" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-align-last" (vector
+"ms"
+)
+ tbl)
+(puthash "svg-shadow" (vector
+"webkit"
+)
+ tbl)
+(puthash "accelerator" (vector
+"ms"
+)
+ tbl)
+(puthash "locale" (vector
+"webkit"
+)
+ tbl)
+(puthash "line-clamp" (vector
+"webkit"
+)
+ tbl)
+(puthash "column-count" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "line-box-contain" (vector
+"webkit"
+)
+ tbl)
+(puthash "line-break" (vector
+"webkit"
+"ms"
+)
+ tbl)
+(puthash "transform-style" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "perspective" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "orient" (vector
+"moz"
+)
+ tbl)
+(puthash "float-edge" (vector
+"moz"
+)
+ tbl)
+(puthash "image-region" (vector
+"moz"
+)
+ tbl)
+(puthash "mask-box-image-width" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-inline-policy" (vector
+"moz"
+)
+ tbl)
+(puthash "user-modify" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "content-zoom-snap-type" (vector
+"ms"
+)
+ tbl)
+(puthash "outline-radius-bottomright" (vector
+"moz"
+)
+ tbl)
+(puthash "wrap-margin" (vector
+"ms"
+)
+ tbl)
+(puthash "transform-origin-z" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-box-image" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-chaining" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-row" (vector
+"ms"
+)
+ tbl)
+(puthash "nbsp-mode" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-box-image-source" (vector
+"webkit"
+)
+ tbl)
+(puthash "font-language-override" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-delay" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "hyphenate-character" (vector
+"webkit"
+)
+ tbl)
+(puthash "box-flex-group" (vector
+"webkit"
+)
+ tbl)
+(puthash "border-image" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "highlight" (vector
+"webkit"
+)
+ tbl)
+(puthash "marquee-repetition" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-column" (vector
+"ms"
+)
+ tbl)
+(puthash "box-align" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "user-input" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-duration" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "transform-origin-y" (vector
+"ms"
+)
+ tbl)
+(puthash "box-ordinal-group" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "box-orient" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "stack-sizing" (vector
+"moz"
+)
+ tbl)
+(puthash "transition" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "text-size-adjust" (vector
+"moz"
+"ms"
+)
+ tbl)
+(puthash "filter" (vector
+"ms"
+)
+ tbl)
+(puthash "content-zoom-boundary" (vector
+"ms"
+)
+ tbl)
+(puthash "layout-grid-char" (vector
+"ms"
+)
+ tbl)
+(puthash "perspective-origin-x" (vector
+"ms"
+)
+ tbl)
+(puthash "perspective-origin-y" (vector
+"ms"
+)
+ tbl)
+(puthash "column-rule-color" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "high-contrast-adjust" (vector
+"ms"
+)
+ tbl)
+(puthash "text-justify" (vector
+"ms"
+)
+ tbl)
+(puthash "text-decoration-color" (vector
+"moz"
+)
+ tbl)
+(puthash "block-progression" (vector
+"ms"
+)
+ tbl)
+(puthash "border-horizontal-spacing" (vector
+"webkit"
+)
+ tbl)
+(puthash "wrap-flow" (vector
+"ms"
+)
+ tbl)
+(puthash "margin-before-collapse" (vector
+"webkit"
+)
+ tbl)
+(puthash "table-baseline" (vector
+"o"
+)
+ tbl)
+(puthash "background-clip" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "interpolation-mode" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-snap-type" (vector
+"ms"
+)
+ tbl)
+(puthash "text-emphasis-style" (vector
+"webkit"
+)
+ tbl)
+(puthash "flow-from" (vector
+"ms"
+)
+ tbl)
+(puthash "backface-visibility" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "transform" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "column-break-after" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-composite" (vector
+"webkit"
+)
+ tbl)
+(puthash "layout-grid" (vector
+"ms"
+)
+ tbl)
+(puthash "column-width" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "scrollbar-base-color" (vector
+"ms"
+)
+ tbl)
+(puthash "window-shadow" (vector
+"moz"
+)
+ tbl)
+(puthash "object-fit" (vector
+"o"
+)
+ tbl)
+(puthash "text-decorations-in-effect" (vector
+"webkit"
+)
+ tbl)
+(puthash "box-flex" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "hyphenate-limit-after" (vector
+"webkit"
+)
+ tbl)
+(puthash "animation-play-state" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "transition-delay" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "input-format" (vector
+"o"
+)
+ tbl)
+(puthash "mask-attachment" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-boundary-right" (vector
+"ms"
+)
+ tbl)
+(puthash "animation-iteration-count" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "link" (vector
+"o"
+)
+ tbl)
+(puthash "content-zoom-boundary-max" (vector
+"ms"
+)
+ tbl)
+(puthash "text-decoration-style" (vector
+"moz"
+)
+ tbl)
+(puthash "text-autospace" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-origin" (vector
+"webkit"
+)
+ tbl)
+(puthash "user-focus" (vector
+"moz"
+)
+ tbl)
+(puthash "border-bottom-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "scroll-boundary-top" (vector
+"ms"
+)
+ tbl)
+(puthash "content-zooming" (vector
+"ms"
+)
+ tbl)
+(puthash "appearance" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "scroll-snap-x" (vector
+"ms"
+)
+ tbl)
+(puthash "marquee-loop" (vector
+"o"
+)
+ tbl)
+(puthash "column-rule-style" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "marquee-increment" (vector
+"webkit"
+)
+ tbl)
+(puthash "behavior" (vector
+"ms"
+)
+ tbl)
+(puthash "box-pack" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "animation-direction" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "scrollbar-darkshadow-color" (vector
+"ms"
+)
+ tbl)
+(puthash "animation-timing-function" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "text-blink" (vector
+"moz"
+)
+ tbl)
+(puthash "scroll-boundary-bottom" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-box-image-repeat" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-orientation" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-column-span" (vector
+"ms"
+)
+ tbl)
+(puthash "binding" (vector
+"moz"
+)
+ tbl)
+(puthash "transform-origin" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "text-decoration-line" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-name" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "marquee-dir" (vector
+"o"
+)
+ tbl)
+(puthash "content-zoom-snap" (vector
+"ms"
+)
+ tbl)
+(puthash "border-top-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "border-vertical-spacing" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-rows" (vector
+"ms"
+)
+ tbl)
+(puthash "box-reflect" (vector
+"webkit"
+)
+ tbl)
+(puthash "hyphenate-limit-before" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-box-image-outset" (vector
+"webkit"
+)
+ tbl)
+(puthash "outline-radius-bottomleft" (vector
+"moz"
+)
+ tbl)
+(puthash "text-overflow" (vector
+"ms"
+)
+ tbl)
+(puthash "border-right-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "layout-flow" (vector
+"ms"
+)
+ tbl)
+(puthash "box-direction" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "animation" (vector
+"webkit"
+"o"
+)
+ tbl)
+(puthash "hyphenate-limit-lines" (vector
+"ms"
+)
+ tbl)
+(puthash "scrollbar-face-color" (vector
+"ms"
+)
+ tbl)
+(puthash "column-break-before" (vector
+"webkit"
+)
+ tbl)
+(puthash "content-zoom-snap-points" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-row-span" (vector
+"ms"
+)
+ tbl)
+(puthash "touch-action" (vector
+"ms"
+)
+ tbl)
+(puthash "marquee-style" (vector
+"webkit"
+"o"
+)
+ tbl)
+(puthash "margin-after-collapse" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-kashida-space" (vector
+"ms"
+)
+ tbl)
+(puthash "scrollbar-shadow-color" (vector
+"ms"
+)
+ tbl)
+(puthash "object-position" (vector
+"o"
+)
+ tbl)
+(puthash "hyphenate-limit-zone" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-snap-y" (vector
+"ms"
+)
+ tbl)
+(puthash "transform-origin-x" (vector
+"ms"
+)
+ tbl)
+(puthash "transition-property" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "word-break" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-snap-points-y" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-boundary" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-repeat" (vector
+"webkit"
+)
+ tbl)
+(puthash "writing-mode" (vector
+"webkit"
+"ms"
+)
+ tbl)
+(puthash "layout-grid-mode" (vector
+"ms"
+)
+ tbl)
+(puthash "background-position-y" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-rails" (vector
+"ms"
+)
+ tbl)
+(puthash "content-zoom-boundary-min" (vector
+"ms"
+)
+ tbl)
+(puthash "background-position-x" (vector
+"ms"
+)
+ tbl)
+(puthash "box-sizing" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "transition-duration" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "rtl-ordering" (vector
+"webkit"
+)
+ tbl)
+(puthash "layout-grid-line" (vector
+"ms"
+)
+ tbl)
+(puthash "font-smoothing" (vector
+"webkit"
+)
+ tbl)
+(puthash "transition-timing-function" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+tbl) tbl)
+(puthash "unitlessProperties" (vector
+"z-index"
+"line-height"
+"opacity"
+"font-weight"
+"zoom"
+)
+ tbl)
+(puthash "floatUnit" "em" tbl)
+(puthash "intUnit" "px" tbl)
+(puthash "color" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "case" "auto" tbl)
+(puthash "shortenIfPossible" t tbl)
+(puthash "trailingAliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "h" "hidden" tbl)
+(puthash "s" "solid" tbl)
+(puthash "t" "dotted" tbl)
+(puthash "n" "none" tbl)
+tbl) tbl)
+tbl) tbl)
+(puthash "keywordAliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "a" "auto" tbl)
+(puthash "do" "dotted" tbl)
+(puthash "i" "inherit" tbl)
+(puthash "da" "dashed" tbl)
+(puthash "s" "solid" tbl)
+(puthash "t" "transparent" tbl)
+tbl) tbl)
+(puthash "keywords" (vector
+"auto"
+"inherit"
+)
+ tbl)
+(puthash "unitAliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "e" "em" tbl)
+(puthash "r" "rem" tbl)
+(puthash "-" "px" tbl)
+(puthash "x" "ex" tbl)
+(puthash "p" "%" tbl)
+tbl) tbl)
+tbl) tbl)
+tbl))
diff --git a/src/snippets.el b/src/snippets.el
new file mode 100644
index 0000000..9a508ed
--- /dev/null
+++ b/src/snippets.el
@@ -0,0 +1,698 @@
+;; src/snippets.el
+;; This file is generated from conf/snippets.json
+;; Don't edit.
+(zencoding-defparameter zencoding-snippets
+(let ((tbl (make-hash-table :test 'equal)))
+(puthash "html" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "snippets" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "!!!" "<!doctype html>" tbl)
+(puthash "!!!xxs" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" tbl)
+(puthash "cc:ie6" "<!--[if lte IE 6]>\n\t${child}\n<![endif]-->" tbl)
+(puthash "cc:ie" "<!--[if IE]>\n\t${child}\n<![endif]-->" tbl)
+(puthash "!!!xs" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" tbl)
+(puthash "!!!4t" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" tbl)
+(puthash "cc:noie" "<!--[if !IE]><!-->\n\t${child}\n<!--<![endif]-->" tbl)
+(puthash "!!!4s" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" tbl)
+(puthash "!!!xt" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" tbl)
+tbl) tbl)
+(puthash "aliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "a:link" "a href=http://" tbl)
+(puthash "doc4" "html>(head>meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"+title{Document})" tbl)
+(puthash "input:datetime-local" "input type=datetime-local" tbl)
+(puthash "input:reset" "input type=reset" tbl)
+(puthash "meta:vp" "meta name=viewport content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\"" tbl)
+(puthash "colg" "colgroup" tbl)
+(puthash "btn:s" "button type=submit" tbl)
+(puthash "btn:r" "button type=reset" tbl)
+(puthash "tr+" "tr>td" tbl)
+(puthash "adr" "address" tbl)
+(puthash "bdo:l" "bdo dir=ltr" tbl)
+(puthash "colgroup+" "colgroup>col" tbl)
+(puthash "btn:b" "button type=button" tbl)
+(puthash "form:post" "form action method=post" tbl)
+(puthash "bdo:r" "bdo dir=rtl" tbl)
+(puthash "fig" "figure" tbl)
+(puthash "input:radio" "input type=radio" tbl)
+(puthash "link:print" "link rel=stylesheet href=print.css media=print" tbl)
+(puthash "opt" "option" tbl)
+(puthash "input:i" "input:image" tbl)
+(puthash "figc" "figcaption" tbl)
+(puthash "input:f" "input:file" tbl)
+(puthash "input:c" "input:checkbox" tbl)
+(puthash "input:b" "input:button" tbl)
+(puthash "input:t" "input" tbl)
+(puthash "input:p" "input:password" tbl)
+(puthash "input:s" "input:submit" tbl)
+(puthash "input:r" "input:radio" tbl)
+(puthash "ifr" "iframe" tbl)
+(puthash "emb" "embed" tbl)
+(puthash "optg+" "optgroup>option" tbl)
+(puthash "cmd" "command" tbl)
+(puthash "html:5" "!!!+doc lang=en" tbl)
+(puthash "link:atom" "link rel=alternate type=\"application/atom+xml\" title=Atom href=atom.xml" tbl)
+(puthash "table+" "table>tr>td" tbl)
+(puthash "art" "article" tbl)
+(puthash "input:search" "input type=search" tbl)
+(puthash "area:r" "area shape=rect coords href alt" tbl)
+(puthash "area:p" "area shape=poly coords href alt" tbl)
+(puthash "input:date" "input type=date" tbl)
+(puthash "input:button" "input type=button" tbl)
+(puthash "area:d" "area shape=default href alt" tbl)
+(puthash "area:c" "area shape=circle coords href alt" tbl)
+(puthash "out" "output" tbl)
+(puthash "ftr" "footer" tbl)
+(puthash "dlg" "dialog" tbl)
+(puthash "script:src" "script src" tbl)
+(puthash "form:get" "form action method=get" tbl)
+(puthash "meta:utf" "meta http-equiv=Content-Type content=\"text/html;charset=UTF-8\"" tbl)
+(puthash "input:time" "input type=time" tbl)
+(puthash "menu:toolbar" "menu type=toolbar" tbl)
+(puthash "prog" "progress" tbl)
+(puthash "input:email" "input type=email" tbl)
+(puthash "input:submit" "input type=submit" tbl)
+(puthash "leg" "legend" tbl)
+(puthash "ol+" "ol>li" tbl)
+(puthash "optgroup+" "optgroup>option" tbl)
+(puthash "bq" "blockquote" tbl)
+(puthash "src" "source" tbl)
+(puthash "obj" "object" tbl)
+(puthash "dl+" "dl>dt+dd" tbl)
+(puthash "acr" "acronym" tbl)
+(puthash "input:password" "input type=password" tbl)
+(puthash "html:4t" "!!!4t+doc4 lang=en" tbl)
+(puthash "input:file" "input type=file" tbl)
+(puthash "html:4s" "!!!4s+doc4 lang=en" tbl)
+(puthash "tarea" "textarea" tbl)
+(puthash "link:favicon" "link icon rel=shortcut type=image/x-icon href=favicon.ico" tbl)
+(puthash "input:number" "input type=number" tbl)
+(puthash "input:range" "input type=range" tbl)
+(puthash "input:image" "input type=image src alt" tbl)
+(puthash "ul+" "ul>li" tbl)
+(puthash "html:xxs" "!!!xxs+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en" tbl)
+(puthash "input:month" "input type=month" tbl)
+(puthash "fset" "fieldset" tbl)
+(puthash "meta:win" "meta http-equiv=Content-Type content=\"text/html;charset=windows-1251\"" tbl)
+(puthash "menu:t" "menu:toolbar" tbl)
+(puthash "menu:c" "menu:context" tbl)
+(puthash "link:rss" "link rel=alternate type=application/rss+xml title=RSS href=rss.xml" tbl)
+(puthash "select+" "select>option" tbl)
+(puthash "hdr" "header" tbl)
+(puthash "cap" "caption" tbl)
+(puthash "det" "details" tbl)
+(puthash "link:touch" "link rel=apple-touch-icon href=favicon.png" tbl)
+(puthash "str" "strong" tbl)
+(puthash "link:css" "link rel=stylesheet href=style.css" tbl)
+(puthash "input:week" "input type=week" tbl)
+(puthash "optg" "optgroup" tbl)
+(puthash "input:datetime" "input type=datetime" tbl)
+(puthash "input:h" "input:hidden" tbl)
+(puthash "!" "html:5" tbl)
+(puthash "html:xml" "html xmlns=http://www.w3.org/1999/xhtml" tbl)
+(puthash "btn" "button" tbl)
+(puthash "input:url" "input type=url" tbl)
+(puthash "menu:context" "menu type=context" tbl)
+(puthash "colg+" "colgroup>col" tbl)
+(puthash "input:color" "input type=color" tbl)
+(puthash "meta:compat" "meta http-equiv=X-UA-Compatible content=\"IE=edge,chrome=1\"" tbl)
+(puthash "input:hidden" "input type=hidden" tbl)
+(puthash "a:mail" "a href=mailto:" tbl)
+(puthash "html:xs" "!!!xs+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en" tbl)
+(puthash "html:xt" "!!!xt+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en" tbl)
+(puthash "datal" "datalist" tbl)
+(puthash "map+" "map>area" tbl)
+(puthash "kg" "keygen" tbl)
+(puthash "doc" "html>(head>meta charset=UTF-8+title{Document})+body" tbl)
+(puthash "datag" "datagrid" tbl)
+(puthash "input:text" "input" tbl)
+(puthash "input:checkbox" "input type=checkbox" tbl)
+(puthash "fst" "fieldset" tbl)
+(puthash "sect" "section" tbl)
+tbl) tbl)
+tbl) tbl)
+(puthash "css" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "snippets" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "bdls" "border-left-style:|;" tbl)
+(puthash "bdlw" "border-left-width:|;" tbl)
+(puthash "bdli" "border-left-image:url(|);" tbl)
+(puthash "bdlc" "border-left-color:${1:#000};" tbl)
+(puthash "whsc" "white-space-collapse:|;" tbl)
+(puthash "bdtlrs" "border-top-left-radius:|;" tbl)
+(puthash "bdblrs" "border-bottom-left-radius:|;" tbl)
+(puthash "d:tbc" "display:table-cell;" tbl)
+(puthash "wow:n" "word-wrap:none;" tbl)
+(puthash "tw" "text-wrap:|;" tbl)
+(puthash "tt" "text-transform:${1:uppercase};" tbl)
+(puthash "tr" "text-replace:|;" tbl)
+(puthash "to" "text-outline:|;" tbl)
+(puthash "wow:u" "word-wrap:unrestricted;" tbl)
+(puthash "tj" "text-justify:|;" tbl)
+(puthash "wow:s" "word-wrap:suppress;" tbl)
+(puthash "th" "text-height:|;" tbl)
+(puthash "d:tbr" "display:table-row;" tbl)
+(puthash "td" "text-decoration:${1:none};" tbl)
+(puthash "te" "text-emphasis:|;" tbl)
+(puthash "bgc:t" "background-color:transparent;" tbl)
+(puthash "list:lr" "list-style-type:lower-roman;" tbl)
+(puthash "bdl+" "border-left:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "bxz" "box-sizing:${1:border-box};" tbl)
+(puthash "bdbk:c" "border-break:close;" tbl)
+(puthash "bgbk:bb" "background-break:bounding-box;" tbl)
+(puthash "f" "font:|;" tbl)
+(puthash "list" "list-style-type:|;" tbl)
+(puthash "trf" "transform:|;" tbl)
+(puthash "p" "padding:|;" tbl)
+(puthash "bdbi:n" "border-bottom-image:none;" tbl)
+(puthash "bdf:r" "border-fit:repeat;" tbl)
+(puthash "trs" "transition:${1:prop} ${2:time};" tbl)
+(puthash "bdrst" "border-right-style:|;" tbl)
+(puthash "zm" "zoom:1;" tbl)
+(puthash "to:n" "text-outline:none;" tbl)
+(puthash "trf:t" "transform: translate(${1:x}, ${2:y});" tbl)
+(puthash "animfm:bt" "animation-fill-mode:both;" tbl)
+(puthash "animfm:bh" "animation-fill-mode:both;" tbl)
+(puthash "bgcp:cb" "background-clip:content-box;" tbl)
+(puthash "lisp:o" "list-style-position:outside;" tbl)
+(puthash "lisp:i" "list-style-position:inside;" tbl)
+(puthash "d:tbclg" "display:table-column-group;" tbl)
+(puthash "bdf" "border-fit:${1:repeat};" tbl)
+(puthash "@f" "@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}" tbl)
+(puthash "bdc" "border-color:${1:#000};" tbl)
+(puthash "d:rbt" "display:ruby-text;" tbl)
+(puthash "bdl" "border-left:|;" tbl)
+(puthash "@i" "@import url(|);" tbl)
+(puthash "bdi" "border-image:url(|);" tbl)
+(puthash "bgsz" "background-size:|;" tbl)
+(puthash "@m" "@media ${1:screen} {\n\t|\n}" tbl)
+(puthash "fef:eb" "font-effect:emboss;" tbl)
+(puthash "bdt" "border-top:|;" tbl)
+(puthash "bdw" "border-width:|;" tbl)
+(puthash "pgbb" "page-break-before:|;" tbl)
+(puthash "fef:eg" "font-effect:engrave;" tbl)
+(puthash "bds" "border-style:|;" tbl)
+(puthash "bdr" "border-right:|;" tbl)
+(puthash "pgbi" "page-break-inside:|;" tbl)
+(puthash "bgi" "background-image:url(|);" tbl)
+(puthash "mr" "margin-right:|;" tbl)
+(puthash "ta-lst" "text-align-last:|;" tbl)
+(puthash "te:c" "text-emphasis:circle;" tbl)
+(puthash "te:b" "text-emphasis:before;" tbl)
+(puthash "q:n" "quotes:none;" tbl)
+(puthash "te:n" "text-emphasis:none;" tbl)
+(puthash "ta:l" "text-align:left;" tbl)
+(puthash "bdbs:n" "border-bottom-style:none;" tbl)
+(puthash "bt" "border-top:|;" tbl)
+(puthash "bg:ie" "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');" tbl)
+(puthash "d:li" "display:list-item;" tbl)
+(puthash "tj:k" "text-justify:kashida;" tbl)
+(puthash "bd+" "border:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "fems:ac" "font-emphasize-style:accent;" tbl)
+(puthash "fst:n" "font-stretch:normal;" tbl)
+(puthash "fst:c" "font-stretch:condensed;" tbl)
+(puthash "fst:e" "font-stretch:expanded;" tbl)
+(puthash "wid" "widows:|;" tbl)
+(puthash "bdts:n" "border-top-style:none;" tbl)
+(puthash "fef" "font-effect:|;" tbl)
+(puthash "cur:t" "cursor:text;" tbl)
+(puthash "bdsp" "border-spacing:|;" tbl)
+(puthash "cur:p" "cursor:pointer;" tbl)
+(puthash "animps:r" "animation-play-state:running;" tbl)
+(puthash "animps:p" "animation-play-state:paused;" tbl)
+(puthash "maw:n" "max-width:none;" tbl)
+(puthash "fw:n" "font-weight:normal;" tbl)
+(puthash "bdtri:n" "border-top-right-image:none;" tbl)
+(puthash "fw:b" "font-weight:bold;" tbl)
+(puthash "bdtri:c" "border-top-right-image:continue;" tbl)
+(puthash "cur:a" "cursor:auto;" tbl)
+(puthash "cur:c" "cursor:crosshair;" tbl)
+(puthash "bdls:n" "border-left-style:none;" tbl)
+(puthash "tw:u" "text-wrap:unrestricted;" tbl)
+(puthash "lts" "letter-spacing:|;" tbl)
+(puthash "c:ra" "color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});" tbl)
+(puthash "va:sub" "vertical-align:sub;" tbl)
+(puthash "tw:s" "text-wrap:suppress;" tbl)
+(puthash "ti" "text-indent:|;" tbl)
+(puthash "pgbi:av" "page-break-inside:avoid;" tbl)
+(puthash "tj:t" "text-justify:tibetan;" tbl)
+(puthash "bgc" "background-color:${1:#fff};" tbl)
+(puthash "trf:tx" "transform: translateX(${1:x});" tbl)
+(puthash "trf:ty" "transform: translateY(${1:y});" tbl)
+(puthash "va:sup" "vertical-align:super;" tbl)
+(puthash "va:bl" "vertical-align:baseline;" tbl)
+(puthash "tw:n" "text-wrap:normal;" tbl)
+(puthash "mb" "margin-bottom:|;" tbl)
+(puthash "ml" "margin-left:|;" tbl)
+(puthash "bdtrrs" "border-top-right-radius:|;" tbl)
+(puthash "va:m" "vertical-align:middle;" tbl)
+(puthash "mt" "margin-top:|;" tbl)
+(puthash "bds:dt" "border-style:dotted;" tbl)
+(puthash "v" "visibility:${1:hidden};" tbl)
+(puthash "@import" "@import url(|);" tbl)
+(puthash "ta" "text-align:${1:left};" tbl)
+(puthash "pos:r" "position:relative;" tbl)
+(puthash "va:b" "vertical-align:bottom;" tbl)
+(puthash "tsh+" "text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};" tbl)
+(puthash "cps:t" "caption-side:top;" tbl)
+(puthash "cps:b" "caption-side:bottom;" tbl)
+(puthash "list:dclz" "list-style-type:decimal-leading-zero;" tbl)
+(puthash "f+" "font:${1:1em} ${2:Arial,sans-serif};" tbl)
+(puthash "animic:i" "animation-iteration-count:infinite;" tbl)
+(puthash "bd:n" "border:none;" tbl)
+(puthash "!" "!important" tbl)
+(puthash "bdl:n" "border-left:none;" tbl)
+(puthash "bgsz:a" "background-size:auto;" tbl)
+(puthash "bdlen:a" "border-length:auto;" tbl)
+(puthash "tw:no" "text-wrap:none;" tbl)
+(puthash "bdtri" "border-top-right-image:url(|);" tbl)
+(puthash "ovs" "overflow-style:${1:scrollbar};" tbl)
+(puthash "mar" "max-resolution:${1:res};" tbl)
+(puthash "w" "width:|;" tbl)
+(puthash "maw" "max-width:|;" tbl)
+(puthash "fw" "font-weight:|;" tbl)
+(puthash "ovx" "overflow-x:${1:hidden};" tbl)
+(puthash "ovy" "overflow-y:${1:hidden};" tbl)
+(puthash "ff" "font-family:|;" tbl)
+(puthash "ov" "overflow:${1:hidden};" tbl)
+(puthash "wfsm:sa" "-webkit-font-smoothing:subpixel-antialiased;" tbl)
+(puthash "mah" "max-height:|;" tbl)
+(puthash "cnt:oq" "content:open-quote;" tbl)
+(puthash "fl" "float:${1:left};" tbl)
+(puthash "trsp" "transition-property:${1:prop};" tbl)
+(puthash "va:tb" "vertical-align:text-bottom;" tbl)
+(puthash "h:a" "height:auto;" tbl)
+(puthash "d:ib" "display:inline-block;" tbl)
+(puthash "bgo:cb" "background-origin:content-box;" tbl)
+(puthash "q" "quotes:|;" tbl)
+(puthash "tal:l" "text-align-last:left;" tbl)
+(puthash "va:tt" "vertical-align:text-top;" tbl)
+(puthash "fef:o" "font-effect:outline;" tbl)
+(puthash "ct:ncq" "content:no-close-quote;" tbl)
+(puthash "wow:nm" "word-wrap:normal;" tbl)
+(puthash "ct:noq" "content:no-open-quote;" tbl)
+(puthash "tov:c" "text-overflow:clip;" tbl)
+(puthash "colm" "columns:|;" tbl)
+(puthash "cur:d" "cursor:default;" tbl)
+(puthash "bdli:n" "border-left-image:none;" tbl)
+(puthash "d:tbhg" "display:table-header-group;" tbl)
+(puthash "bga:s" "background-attachment:scroll;" tbl)
+(puthash "tsh" "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};" tbl)
+(puthash "td:n" "text-decoration:none;" tbl)
+(puthash "lh" "line-height:|;" tbl)
+(puthash "fst:sc" "font-stretch:semi-condensed;" tbl)
+(puthash "fst:ec" "font-stretch:extra-condensed;" tbl)
+(puthash "fsm:a" "font-smooth:auto;" tbl)
+(puthash "bdlc:t" "border-left-color:transparent;" tbl)
+(puthash "bga:f" "background-attachment:fixed;" tbl)
+(puthash "fsm:n" "font-smooth:never;" tbl)
+(puthash "anim" "animation:|;" tbl)
+(puthash "tbl:f" "table-layout:fixed;" tbl)
+(puthash "tbl:a" "table-layout:auto;" tbl)
+(puthash "bdci:n" "border-corner-image:none;" tbl)
+(puthash "bxsh:ra" "box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});" tbl)
+(puthash "whsc:k" "white-space-collapse:keep-all;" tbl)
+(puthash "bdci:c" "border-corner-image:continue;" tbl)
+(puthash "va:t" "vertical-align:top;" tbl)
+(puthash "colmc" "column-count:|;" tbl)
+(puthash "colmf" "column-fill:|;" tbl)
+(puthash "colmg" "column-gap:|;" tbl)
+(puthash "bdb:n" "border-bottom:none;" tbl)
+(puthash "l" "left:|;" tbl)
+(puthash "lisp" "list-style-position:|;" tbl)
+(puthash "colmr" "column-rule:|;" tbl)
+(puthash "colms" "column-span:|;" tbl)
+(puthash "colmw" "column-width:|;" tbl)
+(puthash "bdbi" "border-bottom-image:url(|);" tbl)
+(puthash "bdbk" "border-break:${1:close};" tbl)
+(puthash "pgba:r" "page-break-after:right;" tbl)
+(puthash "wfsm" "-webkit-font-smoothing:${1:antialiased};" tbl)
+(puthash "bdbc" "border-bottom-color:${1:#000};" tbl)
+(puthash "ec" "empty-cells:|;" tbl)
+(puthash "te:ac" "text-emphasis:accent;" tbl)
+(puthash "fs" "font-style:${1:italic};" tbl)
+(puthash "l:a" "left:auto;" tbl)
+(puthash "bdr:n" "border-right:none;" tbl)
+(puthash "bdrst:n" "border-right-style:none;" tbl)
+(puthash "bdbs" "border-bottom-style:|;" tbl)
+(puthash "bdbw" "border-bottom-width:|;" tbl)
+(puthash "whsc:ba" "white-space-collapse:break-all;" tbl)
+(puthash "@kf" "@-webkit-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}" tbl)
+(puthash "fv" "font-variant:|;" tbl)
+(puthash "lisi" "list-style-image:|;" tbl)
+(puthash "whsc:bs" "white-space-collapse:break-strict;" tbl)
+(puthash "b:a" "bottom:auto;" tbl)
+(puthash "bdt+" "border-top:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "fz" "font-size:|;" tbl)
+(puthash "ta:c" "text-align:center;" tbl)
+(puthash "bdf:sp" "border-fit:space;" tbl)
+(puthash "ovy:a" "overflow-y:auto;" tbl)
+(puthash "bdb+" "border-bottom:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "d:tb" "display:table;" tbl)
+(puthash "bdf:st" "border-fit:stretch;" tbl)
+(puthash "ti:-" "text-indent:-9999px;" tbl)
+(puthash "c:r" "color:rgb(${1:0}, ${2:0}, ${3:0});" tbl)
+(puthash "ta:j" "text-align:justify;" tbl)
+(puthash "ovy:h" "overflow-y:hidden;" tbl)
+(puthash "cnt:cs" "content:counters(|);" tbl)
+(puthash "orp" "orphans:|;" tbl)
+(puthash "cnt:cq" "content:close-quote;" tbl)
+(puthash "ovy:s" "overflow-y:scroll;" tbl)
+(puthash "ta:r" "text-align:right;" tbl)
+(puthash "bdf:sc" "border-fit:scale;" tbl)
+(puthash "ovy:v" "overflow-y:visible;" tbl)
+(puthash "ori" "orientation:|;" tbl)
+(puthash "fem" "font-emphasize:|;" tbl)
+(puthash "cnt:n" "content:normal;" tbl)
+(puthash "bdts" "border-top-style:|;" tbl)
+(puthash "bdtw" "border-top-width:|;" tbl)
+(puthash "cnt:c" "content:counter(|);" tbl)
+(puthash "cnt:a" "content:attr(|);" tbl)
+(puthash "bdtc" "border-top-color:${1:#000};" tbl)
+(puthash "cnt:noq" "content:no-open-quote;" tbl)
+(puthash "td:u" "text-decoration:underline;" tbl)
+(puthash "bdti" "border-top-image:url(|);" tbl)
+(puthash "bdtli" "border-top-left-image:url(|);" tbl)
+(puthash "bdf:of" "border-fit:overflow;" tbl)
+(puthash "fl:l" "float:left;" tbl)
+(puthash "tt:n" "text-transform:none;" tbl)
+(puthash "fl:n" "float:none;" tbl)
+(puthash "bdbrrs" "border-bottom-right-radius:|;" tbl)
+(puthash "bdf:ow" "border-fit:overwrite;" tbl)
+(puthash "tt:l" "text-transform:lowercase;" tbl)
+(puthash "fl:r" "float:right;" tbl)
+(puthash "tt:c" "text-transform:capitalize;" tbl)
+(puthash "tov" "text-overflow:${1:ellipsis};" tbl)
+(puthash "ec:s" "empty-cells:show;" tbl)
+(puthash "bgr:sp" "background-repeat:space;" tbl)
+(puthash "ec:h" "empty-cells:hide;" tbl)
+(puthash "tt:u" "text-transform:uppercase;" tbl)
+(puthash "animdir:ar" "animation-direction:alternate-reverse;" tbl)
+(puthash "bdti:n" "border-top-image:none;" tbl)
+(puthash "trstf" "transition-timing-function:${1:tfunc};" tbl)
+(puthash "colmrc" "column-rule-color:|;" tbl)
+(puthash "fst:ee" "font-stretch:extra-expanded;" tbl)
+(puthash "bdbri" "border-bottom-right-image:url(|);" tbl)
+(puthash "trf:r" "transform: rotate(${1:angle});" tbl)
+(puthash "colmrs" "column-rule-style:|;" tbl)
+(puthash "colmrw" "column-rule-width:|;" tbl)
+(puthash "rsz" "resize:|;" tbl)
+(puthash "d:cp" "display:compact;" tbl)
+(puthash "b" "bottom:|;" tbl)
+(puthash "fef:n" "font-effect:none;" tbl)
+(puthash "bdt:n" "border-top:none;" tbl)
+(puthash "to+" "text-outline:${1:0} ${2:0} ${3:#000};" tbl)
+(puthash "r" "right:|;" tbl)
+(puthash "bdbri:n" "border-bottom-right-image:none;" tbl)
+(puthash "tsh:r" "text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});" tbl)
+(puthash "animdel" "animation-delay:${1:time};" tbl)
+(puthash "pgbi:au" "page-break-inside:auto;" tbl)
+(puthash "bdbri:c" "border-bottom-right-image:continue;" tbl)
+(puthash "animic" "animation-iteration-count:${1:1};" tbl)
+(puthash "tsh:n" "text-shadow:none;" tbl)
+(puthash "fv:sc" "font-variant:small-caps;" tbl)
+(puthash "bds:i" "border-style:inset;" tbl)
+(puthash "mih" "min-height:|;" tbl)
+(puthash "r:a" "right:auto;" tbl)
+(puthash "bdrc:t" "border-right-color:transparent;" tbl)
+(puthash "fems:ds" "font-emphasize-style:disc;" tbl)
+(puthash "fems:dt" "font-emphasize-style:dot;" tbl)
+(puthash "zoo" "zoom:1;" tbl)
+(puthash "lis" "list-style:|;" tbl)
+(puthash "mir" "min-resolution:${1:res};" tbl)
+(puthash "miw" "min-width:|;" tbl)
+(puthash "whs" "white-space:|;" tbl)
+(puthash "bdtc:t" "border-top-color:transparent;" tbl)
+(puthash "op:ms" "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';" tbl)
+(puthash "bds:dtds" "border-style:dot-dash;" tbl)
+(puthash "bdb" "border-bottom:|;" tbl)
+(puthash "m" "margin:|;" tbl)
+(puthash "bgcp:nc" "background-clip:no-clip;" tbl)
+(puthash "wow" "word-wrap:|;" tbl)
+(puthash "w:a" "width:auto;" tbl)
+(puthash "bg:n" "background:none;" tbl)
+(puthash "ml:a" "margin-left:auto;" tbl)
+(puthash "bds:dtdtds" "border-style:dot-dot-dash;" tbl)
+(puthash "animtf:cb" "animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});" tbl)
+(puthash "pgba" "page-break-after:|;" tbl)
+(puthash "ff:s" "font-family:serif;" tbl)
+(puthash "d:rbb" "display:ruby-base;" tbl)
+(puthash "tj:d" "text-justify:distribute;" tbl)
+(puthash "tj:a" "text-justify:auto;" tbl)
+(puthash "trfo" "transform-origin:|;" tbl)
+(puthash "ff:f" "font-family:fantasy;" tbl)
+(puthash "trfs" "transform-style:${1:preserve-3d};" tbl)
+(puthash "fems:c" "font-emphasize-style:circle;" tbl)
+(puthash "ff:c" "font-family:cursive;" tbl)
+(puthash "d:itb" "display:inline-table;" tbl)
+(puthash "fems:n" "font-emphasize-style:none;" tbl)
+(puthash "ff:m" "font-family:monospace;" tbl)
+(puthash "pgba:au" "page-break-after:auto;" tbl)
+(puthash "bdri:n" "border-right-image:none;" tbl)
+(puthash "mt:a" "margin-top:auto;" tbl)
+(puthash "tbl" "table-layout:|;" tbl)
+(puthash "wob:l" "word-break:loose;" tbl)
+(puthash "animfm:b" "animation-fill-mode:backwards;" tbl)
+(puthash "animfm:f" "animation-fill-mode:forwards;" tbl)
+(puthash "td:o" "text-decoration:overline;" tbl)
+(puthash "td:l" "text-decoration:line-through;" tbl)
+(puthash "bxz:bb" "box-sizing:border-box;" tbl)
+(puthash "bxsh:n" "box-shadow:none;" tbl)
+(puthash "h" "height:|;" tbl)
+(puthash "pgba:al" "page-break-after:always;" tbl)
+(puthash "animtf:e" "animation-timing-function:ease;" tbl)
+(puthash "animtf:l" "animation-timing-function:linear;" tbl)
+(puthash "bxsh:r" "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});" tbl)
+(puthash "fw:br" "font-weight:bolder;" tbl)
+(puthash "ovs:p" "overflow-style:panner;" tbl)
+(puthash "ovs:s" "overflow-style:scrollbar;" tbl)
+(puthash "fv:n" "font-variant:normal;" tbl)
+(puthash "ovs:a" "overflow-style:auto;" tbl)
+(puthash "m:a" "margin:auto;" tbl)
+(puthash "animdir" "animation-direction:${1:normal};" tbl)
+(puthash "ovs:m" "overflow-style:move;" tbl)
+(puthash "ol:n" "outline:none;" tbl)
+(puthash "fsm:aw" "font-smooth:always;" tbl)
+(puthash "whs:nw" "white-space:nowrap;" tbl)
+(puthash "wos" "word-spacing:|;" tbl)
+(puthash "wob" "word-break:|;" tbl)
+(puthash "pgbb:au" "page-break-before:auto;" tbl)
+(puthash "op:ie" "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);" tbl)
+(puthash "rsz:h" "resize:horizontal;" tbl)
+(puthash "bgcp" "background-clip:${1:padding-box};" tbl)
+(puthash "fst:ue" "font-stretch:ultra-expanded;" tbl)
+(puthash "fst:uc" "font-stretch:ultra-condensed;" tbl)
+(puthash "pgbb:al" "page-break-before:always;" tbl)
+(puthash "c" "color:${1:#000};" tbl)
+(puthash "bdrc" "border-right-color:${1:#000};" tbl)
+(puthash "bdtli:n" "border-top-left-image:none;" tbl)
+(puthash "bdtli:c" "border-top-left-image:continue;" tbl)
+(puthash "list:ur" "list-style-type:upper-roman;" tbl)
+(puthash "fst:se" "font-stretch:semi-expanded;" tbl)
+(puthash "coi" "counter-increment:|;" tbl)
+(puthash "tr:n" "text-replace:none;" tbl)
+(puthash "bgbk:c" "background-break:continuous;" tbl)
+(puthash "ov:a" "overflow:auto;" tbl)
+(puthash "te:a" "text-emphasis:after;" tbl)
+(puthash "cm" "/* |${child} */" tbl)
+(puthash "cl" "clear:${1:both};" tbl)
+(puthash "femp" "font-emphasize-position:|;" tbl)
+(puthash "ov:h" "overflow:hidden;" tbl)
+(puthash "wob:bs" "word-break:break-strict;" tbl)
+(puthash "ov:v" "overflow:visible;" tbl)
+(puthash "ov:s" "overflow:scroll;" tbl)
+(puthash "bxsh" "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};" tbl)
+(puthash "cp" "clip:|;" tbl)
+(puthash "ct" "content:|;" tbl)
+(puthash "pr" "padding-right:|;" tbl)
+(puthash "cp:r" "clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});" tbl)
+(puthash "pt" "padding-top:|;" tbl)
+(puthash "ori:p" "orientation:portrait;" tbl)
+(puthash "pb" "padding-bottom:|;" tbl)
+(puthash "cp:a" "clip:auto;" tbl)
+(puthash "bdf:c" "border-fit:clip;" tbl)
+(puthash "ori:l" "orientation:landscape;" tbl)
+(puthash "pl" "padding-left:|;" tbl)
+(puthash "bdci" "border-corner-image:url(|);" tbl)
+(puthash "bdcl" "border-collapse:|;" tbl)
+(puthash "cor" "counter-reset:|;" tbl)
+(puthash "bgsz:cv" "background-size:cover;" tbl)
+(puthash "mb:a" "margin-bottom:auto;" tbl)
+(puthash "trf:sky" "transform: skewY(${1:angle});" tbl)
+(puthash "trf:skx" "transform: skewX(${1:angle});" tbl)
+(puthash "d:rb" "display:ruby;" tbl)
+(puthash "bdlen" "border-length:|;" tbl)
+(puthash "d:ri" "display:run-in;" tbl)
+(puthash "va" "vertical-align:${1:top};" tbl)
+(puthash "bds:db" "border-style:double;" tbl)
+(puthash "d:tbfg" "display:table-footer-group;" tbl)
+(puthash "bds:ds" "border-style:dashed;" tbl)
+(puthash "lis:n" "list-style:none;" tbl)
+(puthash "d:b" "display:block;" tbl)
+(puthash "tal:a" "text-align-last:auto;" tbl)
+(puthash "tal:c" "text-align-last:center;" tbl)
+(puthash "d:i" "display:inline;" tbl)
+(puthash "pgba:l" "page-break-after:left;" tbl)
+(puthash "bgbk:eb" "background-break:each-box;" tbl)
+(puthash "d:n" "display:none;" tbl)
+(puthash "tal:r" "text-align-last:right;" tbl)
+(puthash "tj:iw" "text-justify:inter-word;" tbl)
+(puthash "trf:sc" "transform: scale(${1:x}, ${2:y});" tbl)
+(puthash "olc:i" "outline-color:invert;" tbl)
+(puthash "bgr:x" "background-repeat:repeat-x;" tbl)
+(puthash "bgr:y" "background-repeat:repeat-y;" tbl)
+(puthash "bgr:n" "background-repeat:no-repeat;" tbl)
+(puthash "cnt:ncq" "content:no-close-quote;" tbl)
+(puthash "list:c" "list-style-type:circle;" tbl)
+(puthash "list:d" "list-style-type:disc;" tbl)
+(puthash "bdbli:c" "border-bottom-left-image:continue;" tbl)
+(puthash "bdbli:n" "border-bottom-left-image:none;" tbl)
+(puthash "list:n" "list-style-type:none;" tbl)
+(puthash "list:s" "list-style-type:square;" tbl)
+(puthash "mah:n" "max-height:none;" tbl)
+(puthash "bgr:rd" "background-repeat:round;" tbl)
+(puthash "th:t" "text-height:text-size;" tbl)
+(puthash "d:rbtg" "display:ruby-text-group;" tbl)
+(puthash "bdc:t" "border-color:transparent;" tbl)
+(puthash "th:f" "text-height:font-size;" tbl)
+(puthash "th:a" "text-height:auto;" tbl)
+(puthash "ct:cq" "content:close-quote;" tbl)
+(puthash "ct:cs" "content:counters(|);" tbl)
+(puthash "th:m" "text-height:max-size;" tbl)
+(puthash "animdir:a" "animation-direction:alternate;" tbl)
+(puthash "bxz:cb" "box-sizing:content-box;" tbl)
+(puthash "rsz:n" "resize:none;" tbl)
+(puthash "cur" "cursor:${1:pointer};" tbl)
+(puthash "whs:p" "white-space:pre;" tbl)
+(puthash "rsz:b" "resize:both;" tbl)
+(puthash "animdir:n" "animation-direction:normal;" tbl)
+(puthash "fw:lr" "font-weight:lighter;" tbl)
+(puthash "whsc:n" "white-space-collapse:normal;" tbl)
+(puthash "animtf:eio" "animation-timing-function:ease-in-out;" tbl)
+(puthash "animdir:r" "animation-direction:reverse;" tbl)
+(puthash "te:ds" "text-emphasis:disc;" tbl)
+(puthash "te:dt" "text-emphasis:dot;" tbl)
+(puthash "whs:n" "white-space:normal;" tbl)
+(puthash "whsc:l" "white-space-collapse:loose;" tbl)
+(puthash "rsz:v" "resize:vertical;" tbl)
+(puthash "wob:ba" "word-break:break-all;" tbl)
+(puthash "list:dc" "list-style-type:decimal;" tbl)
+(puthash "d:tbrg" "display:table-row-group;" tbl)
+(puthash "tov:e" "text-overflow:ellipsis;" tbl)
+(puthash "mr:a" "margin-right:auto;" tbl)
+(puthash "pos" "position:${1:relative};" tbl)
+(puthash "fems" "font-emphasize-style:|;" tbl)
+(puthash "d" "display:${1:block};" tbl)
+(puthash "@media" "@media ${1:screen} {\n\t|\n}" tbl)
+(puthash "bgi:n" "background-image:none;" tbl)
+(puthash "wfsm:s" "-webkit-font-smoothing:subpixel-antialiased;" tbl)
+(puthash "q:en" "quotes:'\\201C' '\\201D' '\\2018' '\\2019';" tbl)
+(puthash "wfsm:n" "-webkit-font-smoothing:none;" tbl)
+(puthash "t" "top:|;" tbl)
+(puthash "ovs:mq" "overflow-style:marquee;" tbl)
+(puthash "wfsm:a" "-webkit-font-smoothing:antialiased;" tbl)
+(puthash "animtf" "animation-timing-function:${1:linear};" tbl)
+(puthash "bgbk" "background-break:|;" tbl)
+(puthash "olo" "outline-offset:|;" tbl)
+(puthash "ols" "outline-style:|;" tbl)
+(puthash "olw" "outline-width:|;" tbl)
+(puthash "cnt" "content:'|';" tbl)
+(puthash "bg+" "background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};" tbl)
+(puthash "bdcl:s" "border-collapse:separate;" tbl)
+(puthash "bdcl:c" "border-collapse:collapse;" tbl)
+(puthash "anim-" "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};" tbl)
+(puthash "bgsz:ct" "background-size:contain;" tbl)
+(puthash "bd" "border:|;" tbl)
+(puthash "wob:n" "word-break:normal;" tbl)
+(puthash "bg" "background:|;" tbl)
+(puthash "wob:k" "word-break:keep-all;" tbl)
+(puthash "tj:ic" "text-justify:inter-cluster;" tbl)
+(puthash "bb" "border-bottom:|;" tbl)
+(puthash "bl" "border-left:|;" tbl)
+(puthash "tj:ii" "text-justify:inter-ideograph;" tbl)
+(puthash "t:a" "top:auto;" tbl)
+(puthash "bgcp:bb" "background-clip:border-box;" tbl)
+(puthash "ff:ss" "font-family:sans-serif;" tbl)
+(puthash "br" "border-right:|;" tbl)
+(puthash "bga" "background-attachment:|;" tbl)
+(puthash "ol" "outline:|;" tbl)
+(puthash "cl:r" "clear:right;" tbl)
+(puthash "q:ru" "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';" tbl)
+(puthash "bgo" "background-origin:|;" tbl)
+(puthash "bgp" "background-position:${1:0} ${2:0};" tbl)
+(puthash "bgr" "background-repeat:|;" tbl)
+(puthash "cl:n" "clear:none;" tbl)
+(puthash "cl:l" "clear:left;" tbl)
+(puthash "cl:b" "clear:both;" tbl)
+(puthash "animn" "animation-name:${1:none};" tbl)
+(puthash "op" "opacity:|;" tbl)
+(puthash "fs:o" "font-style:oblique;" tbl)
+(puthash "fs:n" "font-style:normal;" tbl)
+(puthash "bds:h" "border-style:hidden;" tbl)
+(puthash "bdrw" "border-right-width:|;" tbl)
+(puthash "bds:n" "border-style:none;" tbl)
+(puthash "bds:o" "border-style:outset;" tbl)
+(puthash "fs:i" "font-style:italic;" tbl)
+(puthash "ct:oq" "content:open-quote;" tbl)
+(puthash "bds:g" "border-style:groove;" tbl)
+(puthash "olc" "outline-color:${1:#000};" tbl)
+(puthash "bds:r" "border-style:ridge;" tbl)
+(puthash "bds:s" "border-style:solid;" tbl)
+(puthash "bds:w" "border-style:wave;" tbl)
+(puthash "z:a" "z-index:auto;" tbl)
+(puthash "ct:c" "content:counter(|);" tbl)
+(puthash "cur:m" "cursor:move;" tbl)
+(puthash "ct:a" "content:attr(|);" tbl)
+(puthash "pgbb:r" "page-break-before:right;" tbl)
+(puthash "bgo:bb" "background-origin:border-box;" tbl)
+(puthash "ct:n" "content:normal;" tbl)
+(puthash "bdr+" "border-right:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "pgbb:l" "page-break-before:left;" tbl)
+(puthash "fza" "font-size-adjust:|;" tbl)
+(puthash "d:tbcl" "display:table-column;" tbl)
+(puthash "ovx:a" "overflow-x:auto;" tbl)
+(puthash "whs:pl" "white-space:pre-line;" tbl)
+(puthash "trsde" "transition-delay:${1:time};" tbl)
+(puthash "ovx:h" "overflow-x:hidden;" tbl)
+(puthash "ovx:v" "overflow-x:visible;" tbl)
+(puthash "ovx:s" "overflow-x:scroll;" tbl)
+(puthash "trf:scy" "transform: scaleY(${1:y});" tbl)
+(puthash "trf:scx" "transform: scaleX(${1:x});" tbl)
+(puthash "@f+" "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}" tbl)
+(puthash "trsdu" "transition-duration:${1:time};" tbl)
+(puthash "d:tbcp" "display:table-caption;" tbl)
+(puthash "bdrs" "border-radius:|;" tbl)
+(puthash "us" "user-select:${1:none};" tbl)
+(puthash "bgcp:pb" "background-clip:padding-box;" tbl)
+(puthash "bdri" "border-right-image:url(|);" tbl)
+(puthash "z" "z-index:|;" tbl)
+(puthash "d:rbbg" "display:ruby-base-group;" tbl)
+(puthash "tsh:ra" "text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});" tbl)
+(puthash "femp:a" "font-emphasize-position:after;" tbl)
+(puthash "femp:b" "font-emphasize-position:before;" tbl)
+(puthash "animtf:eo" "animation-timing-function:ease-out;" tbl)
+(puthash "whs:pw" "white-space:pre-wrap;" tbl)
+(puthash "animtf:ei" "animation-timing-function:ease-in;" tbl)
+(puthash "ap" "appearance:${1:none};" tbl)
+(puthash "animps" "animation-play-state:${1:running};" tbl)
+(puthash "lisi:n" "list-style-image:none;" tbl)
+(puthash "bdbc:t" "border-bottom-color:transparent;" tbl)
+(puthash "pos:s" "position:static;" tbl)
+(puthash "animdur" "animation-duration:${1:0}s;" tbl)
+(puthash "bdi:n" "border-image:none;" tbl)
+(puthash "pos:f" "position:fixed;" tbl)
+(puthash "pos:a" "position:absolute;" tbl)
+(puthash "fza:n" "font-size-adjust:none;" tbl)
+(puthash "v:h" "visibility:hidden;" tbl)
+(puthash "bgpy" "background-position-y:|;" tbl)
+(puthash "bgpx" "background-position-x:|;" tbl)
+(puthash "v:c" "visibility:collapse;" tbl)
+(puthash "bdbli" "border-bottom-left-image:url(|);" tbl)
+(puthash "fsm" "font-smooth:|;" tbl)
+(puthash "animfm" "animation-fill-mode:${1:both};" tbl)
+(puthash "cur:he" "cursor:help;" tbl)
+(puthash "fst" "font-stretch:|;" tbl)
+(puthash "cur:ha" "cursor:hand;" tbl)
+(puthash "bgo:pb" "background-origin:padding-box;" tbl)
+(puthash "cps" "caption-side:|;" tbl)
+(puthash "v:v" "visibility:visible;" tbl)
+tbl) tbl)
+tbl) tbl)
+tbl))
diff --git a/src/test.el b/src/test.el
new file mode 100644
index 0000000..dc021ae
--- /dev/null
+++ b/src/test.el
@@ -0,0 +1,540 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Test-cases
+
+(load-file (concat (file-name-directory load-file-name) "../zencoding-mode.el"))
+
+(zencoding-defparameter *zencoding-test-cases* nil)
+
+(defun zencoding-test-cases (&rest args)
+ (let ((cmd (car args)))
+ (flet
+ ((run-cases
+ (fn cases)
+ (loop for c in cases
+ for i to (1- (length cases)) do
+ (let ((expected (cdr c))
+ (actual (funcall fn (car c))))
+ (when (not (equal expected actual))
+ (princ
+ (concat "*** [FAIL] | \"" name "\" " (number-to-string i) "\n\n"
+ (format "%s" (car c)) "\t=>\n\n"
+ "Expected\n" (format "%s" expected) "\n\nActual\n" (format "%s" actual) "\n\n"))
+ (return 'fail))))))
+ (cond ((eql cmd 'assign)
+ (let ((name (cadr args))
+ (fn (caddr args))
+ (defs (cadddr args)))
+ (let ((place (assoc name *zencoding-test-cases*)))
+ (if place
+ (setf (cdr place) (cons fn defs))
+ (setq *zencoding-test-cases*
+ (cons (cons name (cons fn defs)) *zencoding-test-cases*))))))
+ (t
+ (loop for test in (reverse *zencoding-test-cases*) do
+ (let ((name (symbol-name (car test)))
+ (fn (cadr test))
+ (cases (cddr test)))
+ (let ((res (run-cases fn cases)))
+ (if (not (eql res 'fail))
+ (princ (concat " [PASS] | \"" name "\" "
+ (number-to-string (length cases)) " tests.\n")))))))))))
+
+(defmacro define-zencoding-transform-test-case (name fn &rest tests)
+ `(zencoding-test-cases 'assign ',name
+ ,fn
+ ',(loop for x on tests by #'cddr collect
+ (cons (car x)
+ (zencoding-join-string (cadr x)
+ "\n")))))
+
+(defmacro define-zencoding-transform-html-test-case (name &rest tests)
+ `(define-zencoding-transform-test-case ,name
+ 'zencoding-html-transform
+ ,@tests))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; XML-abbrev tests
+
+(define-zencoding-transform-html-test-case Tags
+ "a" ("<a href=\"\"></a>")
+ "a.x" ("<a class=\"x\" href=\"\"></a>")
+ "a#q.x" ("<a id=\"q\" class=\"x\" href=\"\"></a>")
+ "a#q.x.y.z" ("<a id=\"q\" class=\"x y z\" href=\"\"></a>")
+ "#q" ("<div id=\"q\">"
+ "</div>")
+ ".x" ("<div class=\"x\">"
+ "</div>")
+ "#q.x" ("<div id=\"q\" class=\"x\">"
+ "</div>")
+ "#q.x.y.z" ("<div id=\"q\" class=\"x y z\">"
+ "</div>"))
+
+(define-zencoding-transform-html-test-case Empty-tags
+ "a/" ("<a href=\"\"/>")
+ "a/.x" ("<a class=\"x\" href=\"\"/>")
+ "a/#q.x" ("<a id=\"q\" class=\"x\" href=\"\"/>")
+ "a/#q.x.y.z" ("<a id=\"q\" class=\"x y z\" href=\"\"/>"))
+
+(define-zencoding-transform-html-test-case Self-closing-tags
+ "input type=text" ("<input type=\"text\" name=\"\" value=\"\"/>")
+ "img" ("<img src=\"\" alt=\"\"/>")
+ "img>metadata/*2" ("<img src=\"\" alt=\"\">"
+ " <metadata/>"
+ " <metadata/>"
+ "</img>"))
+
+(define-zencoding-transform-html-test-case Siblings
+ "a+b" ("<a href=\"\"></a>"
+ "<b></b>")
+ "a+b+c" ("<a href=\"\"></a>"
+ "<b></b>"
+ "<c></c>")
+ "a.x+b" ("<a class=\"x\" href=\"\"></a>"
+ "<b></b>")
+ "a#q.x+b" ("<a id=\"q\" class=\"x\" href=\"\"></a>"
+ "<b></b>")
+ "a#q.x.y.z+b" ("<a id=\"q\" class=\"x y z\" href=\"\"></a>"
+ "<b></b>")
+ "a#q.x.y.z+b#p.l.m.n" ("<a id=\"q\" class=\"x y z\" href=\"\"></a>"
+ "<b id=\"p\" class=\"l m n\"></b>"))
+
+(define-zencoding-transform-html-test-case Tag-expansion
+ "table+" ("<table>"
+ " <tr>"
+ " <td></td>"
+ " </tr>"
+ "</table>")
+ "dl+" ("<dl>"
+ " <dt></dt>"
+ " <dd></dd>"
+ "</dl>")
+ "ul+" ("<ul>"
+ " <li></li>"
+ "</ul>")
+ "ul++ol+" ("<ul>"
+ " <li></li>"
+ "</ul>"
+ "<ol>"
+ " <li></li>"
+ "</ol>")
+ "ul#q.x.y m=l+" ("<ul id=\"q\" class=\"x y\" m=\"l\">"
+ " <li></li>"
+ "</ul>"))
+
+(define-zencoding-transform-html-test-case Parent-child
+ "a>b" ("<a href=\"\"><b></b></a>")
+ "a>b>c" ("<a href=\"\"><b><c></c></b></a>")
+ "a.x>b" ("<a class=\"x\" href=\"\"><b></b></a>")
+ "a#q.x>b" ("<a id=\"q\" class=\"x\" href=\"\"><b></b></a>")
+ "a#q.x.y.z>b" ("<a id=\"q\" class=\"x y z\" href=\"\"><b></b></a>")
+ "a#q.x.y.z>b#p.l.m.n" ("<a id=\"q\" class=\"x y z\" href=\"\"><b id=\"p\" class=\"l m n\"></b></a>")
+ "#q>.x" ("<div id=\"q\">"
+ " <div class=\"x\">"
+ " </div>"
+ "</div>")
+ "a>b+c" ("<a href=\"\">"
+ " <b></b>"
+ " <c></c>"
+ "</a>")
+ "a>b+c>d" ("<a href=\"\">"
+ " <b></b>"
+ " <c><d></d></c>"
+ "</a>"))
+
+(define-zencoding-transform-html-test-case Climb-up
+ "a>b>c^d" ("<a href=\"\">"
+ " <b><c></c></b>"
+ " <d></d>"
+ "</a>")
+ "a>b>c^^d" ("<a href=\"\"><b><c></c></b></a>"
+ "<d></d>")
+ "a*2>b*2>c^d" ("<a href=\"\">"
+ " <b><c></c></b>"
+ " <b><c></c></b>"
+ " <d></d>"
+ "</a>"
+ "<a href=\"\">"
+ " <b><c></c></b>"
+ " <b><c></c></b>"
+ " <d></d>"
+ "</a>")
+
+ "div+a>p>span{foo}+em>b^^^p"
+ ("<div>"
+ "</div>"
+ "<a href=\"\">"
+ " <p>"
+ " <span>foo</span>"
+ " <em><b></b></em>"
+ " </p>"
+ "</a>"
+ "<p></p>")
+
+ "div+div>p>span+em^blockquote{foo}"
+ ("<div>"
+ "</div>"
+ "<div>"
+ " <p>"
+ " <span></span>"
+ " <em></em>"
+ " </p>"
+ " <blockquote>"
+ " foo"
+ " </blockquote>"
+ "</div>"))
+
+(define-zencoding-transform-html-test-case Multiplication
+ "a*1" ("<a href=\"\"></a>")
+ "a*2" ("<a href=\"\"></a>"
+ "<a href=\"\"></a>")
+ "a/*2" ("<a href=\"\"/>"
+ "<a href=\"\"/>")
+ "a*2+b*2" ("<a href=\"\"></a>"
+ "<a href=\"\"></a>"
+ "<b></b>"
+ "<b></b>")
+ "a*2>b*2" ("<a href=\"\">"
+ " <b></b>"
+ " <b></b>"
+ "</a>"
+ "<a href=\"\">"
+ " <b></b>"
+ " <b></b>"
+ "</a>")
+ "a>b*2" ("<a href=\"\">"
+ " <b></b>"
+ " <b></b>"
+ "</a>")
+ "a#q.x>b#q.x*2" ("<a id=\"q\" class=\"x\" href=\"\">"
+ " <b id=\"q\" class=\"x\"></b>"
+ " <b id=\"q\" class=\"x\"></b>"
+ "</a>")
+ "a#q.x>b/#q.x*2" ("<a id=\"q\" class=\"x\" href=\"\">"
+ " <b id=\"q\" class=\"x\"/>"
+ " <b id=\"q\" class=\"x\"/>"
+ "</a>"))
+
+(define-zencoding-transform-html-test-case Numbering
+ "a.$x*3" ("<a class=\"1x\" href=\"\"></a>"
+ "<a class=\"2x\" href=\"\"></a>"
+ "<a class=\"3x\" href=\"\"></a>")
+ "ul>li.item$*3" ("<ul>"
+ " <li class=\"item1\"></li>"
+ " <li class=\"item2\"></li>"
+ " <li class=\"item3\"></li>"
+ "</ul>")
+ "ul>li.item$$$*3" ("<ul>"
+ " <li class=\"item001\"></li>"
+ " <li class=\"item002\"></li>"
+ " <li class=\"item003\"></li>"
+ "</ul>")
+ "ul>li.item$@-*2" ("<ul>"
+ " <li class=\"item2\"></li>"
+ " <li class=\"item1\"></li>"
+ "</ul>")
+ "ul>li.item$@-1000*2" ("<ul>"
+ " <li class=\"item1001\"></li>"
+ " <li class=\"item1000\"></li>"
+ "</ul>")
+ "a.$*2>b.$$@-*3" ("<a class=\"1\" href=\"\">"
+ " <b class=\"03\"></b>"
+ " <b class=\"02\"></b>"
+ " <b class=\"01\"></b>"
+ "</a>"
+ "<a class=\"2\" href=\"\">"
+ " <b class=\"03\"></b>"
+ " <b class=\"02\"></b>"
+ " <b class=\"01\"></b>"
+ "</a>")
+
+ "(div>(a#id$$*2)+b.c$@-3+c#d$)*2"
+ ("<div>"
+ " <a id=\"id01\" href=\"\"></a>"
+ " <a id=\"id02\" href=\"\"></a>"
+ " <b class=\"c4\"></b>"
+ " <c id=\"d1\"></c>"
+ "</div>"
+ "<div>"
+ " <a id=\"id01\" href=\"\"></a>"
+ " <a id=\"id02\" href=\"\"></a>"
+ " <b class=\"c3\"></b>"
+ " <c id=\"d2\"></c>"
+ "</div>")
+
+ "a:b$$$-c$$@-:d$@-3-e$$@100/#b.c$*3"
+ ("<a:b001-c03:d5-e100 id=\"b\" class=\"c1\"/>"
+ "<a:b002-c02:d4-e101 id=\"b\" class=\"c2\"/>"
+ "<a:b003-c01:d3-e102 id=\"b\" class=\"c3\"/>")
+
+ "ul>li.item${name: item$ price: $\\$}*3"
+ ("<ul>"
+ " <li class=\"item1\">name: item1 price: 1$</li>"
+ " <li class=\"item2\">name: item2 price: 2$</li>"
+ " <li class=\"item3\">name: item3 price: 3$</li>"
+ "</ul>"))
+
+(define-zencoding-transform-html-test-case Properties
+ "a x" ("<a href=\"\" x=\"\"></a>")
+ "a x=" ("<a href=\"\" x=\"\"></a>")
+ "a x=\"\"" ("<a href=\"\" x=\"\"></a>")
+ "a x=y" ("<a href=\"\" x=\"y\"></a>")
+ "a x=\"y\"" ("<a href=\"\" x=\"y\"></a>")
+ "a x=\"()\"" ("<a href=\"\" x=\"()\"></a>")
+ "a x m" ("<a href=\"\" x=\"\" m=\"\"></a>")
+ "a x= m=\"\"" ("<a href=\"\" x=\"\" m=\"\"></a>")
+ "a x=y m=l" ("<a href=\"\" x=\"y\" m=\"l\"></a>")
+ "a/ x=y m=l" ("<a href=\"\" x=\"y\" m=\"l\"/>")
+ "a#foo x=y m=l" ("<a id=\"foo\" href=\"\" x=\"y\" m=\"l\"></a>")
+ "a.foo x=y m=l" ("<a class=\"foo\" href=\"\" x=\"y\" m=\"l\"></a>")
+ "a#foo.bar.mu x=y m=l" ("<a id=\"foo\" class=\"bar mu\" href=\"\" x=\"y\" m=\"l\"></a>")
+ "a/#foo.bar.mu x=y m=l" ("<a id=\"foo\" class=\"bar mu\" href=\"\" x=\"y\" m=\"l\"/>")
+ "a x=y+b" ("<a href=\"\" x=\"y\"></a>"
+ "<b></b>")
+ "a x=y+b x=y" ("<a href=\"\" x=\"y\"></a>"
+ "<b x=\"y\"></b>")
+ "a x=y>b" ("<a href=\"\" x=\"y\"><b></b></a>")
+ "a x=y>b x=y" ("<a href=\"\" x=\"y\"><b x=\"y\"></b></a>")
+ "a x=y>b x=y+c x=y" ("<a href=\"\" x=\"y\">"
+ " <b x=\"y\"></b>"
+ " <c x=\"y\"></c>"
+ "</a>"))
+
+(define-zencoding-transform-html-test-case Parentheses
+ "(a)" ("<a href=\"\"></a>")
+ "(a)+(b)" ("<a href=\"\"></a>"
+ "<b></b>")
+ "a>(b)" ("<a href=\"\"><b></b></a>")
+ "(a>b)>c" ("<a href=\"\"><b></b></a>")
+ "(a>b)+c" ("<a href=\"\"><b></b></a>"
+ "<c></c>")
+ "z+(a>b)+c+k" ("<z></z>"
+ "<a href=\"\"><b></b></a>"
+ "<c></c>"
+ "<k></k>")
+ "(a)*2" ("<a href=\"\"></a>"
+ "<a href=\"\"></a>")
+ "((a)*2)" ("<a href=\"\"></a>"
+ "<a href=\"\"></a>")
+ "((a))*2" ("<a href=\"\"></a>"
+ "<a href=\"\"></a>")
+ "(a>b)*2" ("<a href=\"\"><b></b></a>"
+ "<a href=\"\"><b></b></a>")
+ "(a+b)*2" ("<a href=\"\"></a>"
+ "<b></b>"
+ "<a href=\"\"></a>"
+ "<b></b>"))
+
+(define-zencoding-transform-html-test-case Text
+ "a{Click me}" ("<a href=\"\">Click me</a>")
+ "a>{Click me}*3" ("<a href=\"\">"
+ " Click me"
+ " Click me"
+ " Click me"
+ "</a>")
+ "a{click}+b{here}" ("<a href=\"\">click</a>"
+ "<b>here</b>")
+ "a>{click}+b{here}" ("<a href=\"\">"
+ " click"
+ " <b>here</b>"
+ "</a>")
+
+ "p>{Click }+a{here}+{ to continue}"
+ ("<p>"
+ " Click "
+ " <a href=\"\">here</a>"
+ " to continue"
+ "</p>")
+
+ "p{Click }+a{here}+{ to continue}"
+ ("<p>Click </p>"
+ "<a href=\"\">here</a>"
+ " to continue")
+
+ "xxx#id.cls p=1{txt}"
+ ("<xxx id=\"id\" class=\"cls\" p=\"1\">txt</xxx>"))
+
+
+(define-zencoding-transform-html-test-case Filter-comment
+ "a.b|c" ("<!-- .b -->"
+ "<a class=\"b\" href=\"\"></a>"
+ "<!-- /.b -->")
+ "#a>.b|c" ("<!-- #a -->"
+ "<div id=\"a\">"
+ " <!-- .b -->"
+ " <div class=\"b\">"
+ " </div>"
+ " <!-- /.b -->"
+ "</div>"
+ "<!-- /#a -->"))
+
+(define-zencoding-transform-html-test-case Filter-HAML
+ "a|haml" ("%a")
+ "a#q.x.y.z|haml" ("%a#q.x.y.z")
+ "a#q.x x=y m=l|haml" ("%a#q.x{:x => \"y\", :m => \"l\"}")
+ "div|haml" ("%div")
+ "div.footer|haml" (".footer")
+ ".footer|haml" (".footer")
+
+ "p>{This is haml}*2+a href=#+br|haml"
+ ("%p"
+ " This is haml"
+ " This is haml"
+ " %a{:href => \"#\"}"
+ " %br"))
+
+(define-zencoding-transform-html-test-case Filter-Hiccup
+ "a|hic" ("[:a]")
+ "a#q.x.y.z|hic" ("[:a#q.x.y.z]")
+ "a#q.x x=y m=l|hic" ("[:a#q.x {:x \"y\", :m \"l\"}]")
+ ".footer|hic" ("[:div.footer]")
+ "p>a href=#+br|hic" ("[:p"
+ " [:a {:href \"#\"}]"
+ " [:br]]")
+
+ "#q>(a*2>b{x})+p>{m}+b|hic"
+ ("[:div#q"
+ " [:a [:b \"x\"]]"
+ " [:a [:b \"x\"]]"
+ " [:p"
+ " \"m\""
+ " [:b]]]"))
+
+(define-zencoding-transform-html-test-case Filter-escape
+ "script src=&quot;|e" ("&lt;script src=\"&amp;quot;\"&gt;"
+ "&lt;/script&gt;"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; CSS-abbrev tests
+
+(defmacro define-zencoding-unit-test-case (name fn &rest tests)
+ `(zencoding-test-cases 'assign ',name
+ ,fn
+ ',(loop for x on tests by #'cddr collect
+ (cons (car x) (cadr x)))))
+
+(define-zencoding-unit-test-case CSS-toknize
+ #'zencoding-css-toknize
+ "" ("")
+ "abc" ("abc")
+ "abc+" ("abc+")
+ "abc+cde" ("abc" "cde")
+ "abc++cde" ("abc+" "cde")
+ "abc+cde+" ("abc" "cde+")
+ "abc++cde+" ("abc+" "cde+")
+ "ab:c+0p0x#aa+p0+cde+" ("ab:c+0p0x#aa" "p0" "cde+")
+ "ab+#0+p+#c+x++cde+" ("ab+#0" "p+#c" "x+" "cde+")
+ "abc def" ("abc def")
+ "-abc+-xyz" ("-abc" "-xyz")
+ "-abc+-10" ("-abc+-10"))
+
+(define-zencoding-unit-test-case CSS-parse-arg-number
+ #'zencoding-css-arg-number
+ "" (error "expected css number arguments")
+ "0" (("0" "px") . "")
+ "0-1-2" (("0" "px") . "1-2")
+ "-100" (("-100" "px") . "")
+ "-10e-20" (("-10" "em") . "-20")
+ "35p#a" (("35" "%") . "#a")
+ " 0p" (("0" "%") . ""))
+
+(define-zencoding-unit-test-case CSS-parse-arg-color
+ #'zencoding-css-arg-color
+ "" (error "expected css color argument")
+ "abc" (error "expected css color argument")
+ "#x" (error "expected css color argument")
+ "#a" ("#aaa" . "")
+ "#09" ("#090909" . "")
+ "#3D5-2" ("#3D5" . "-2")
+ "#1a2B-3" ("#1a2B1a" . "-3")
+ "#1A2b3x" ("#1A2b31" . "x")
+ "#1a2B3Cx" ("#1a2B3C" . "x")
+ "#1A2B3C4D-2" ("#1A2B3C" . "4D-2")
+ " #abc" ("#abc" . ""))
+
+(define-zencoding-unit-test-case CSS-parse-arg-something
+ #'zencoding-css-arg-something
+ "" (error "expected css argument")
+ "abc" ("abc" . "")
+ "abc def" ("abc" . " def")
+ "url(http://abc.com) auto" ("url(http://abc.com)" . " auto"))
+
+(define-zencoding-unit-test-case CSS-parse-args
+ #'zencoding-css-parse-args
+ "" nil
+ "1-2--3-4" (("1" "px") ("2" "px") ("-3" "px") ("4" "px"))
+ "-10-2p-30#abc" (("-10" "px") ("2" "%") ("-30" "px") "#abc")
+ "1p2x3-4e5x" (("1" "%") ("2" "ex") ("3" "px") ("4" "em") ("5" "ex"))
+ "#abc#de#f-3" ("#abc" "#dedede" "#fff" ("-3" "px")))
+
+(define-zencoding-unit-test-case CSS-split-vendor-prefixes
+ #'zencoding-css-split-vendor-prefixes
+ "" ("" nil)
+ "-abc" ("abc" auto)
+ "-wmso-abc" ("abc" (119 109 115 111)))
+
+(define-zencoding-unit-test-case CSS-exprs
+ #'zencoding-css-expr
+ "" (("" nil nil))
+ "cl:l+ov:h+bg+" (("cl:l" nil nil) ("ov:h" nil nil) ("bg+" nil nil))
+ "m10-auto!" (("m" nil t ("10" "px") "auto"))
+ "bg++c!" (("bg+" nil nil) ("c" nil t))
+ "m+0-10-10--20!+p0-0" (("m+" nil t ("0" "px") ("10" "px") ("10" "px") ("-20" "px"))
+ ("p" nil nil ("0" "px") ("0" "px")))
+ "bg+#abc#bc#c-3!" (("bg+" nil t "#abc" "#bcbcbc" "#ccc" ("-3" "px"))))
+
+(defmacro define-zencoding-transform-css-test-case (name &rest tests)
+ `(define-zencoding-transform-test-case ,name
+ 'zencoding-css-transform
+ ,@tests))
+
+(define-zencoding-transform-css-test-case CSS-transform
+ ;; supplying values with units
+ "m10" ("margin: 10px;")
+ "m1.5" ("margin: 1.5em;")
+ "m1.5ex" ("margin: 1.5ex;")
+ "m1.5x" ("margin: 1.5ex;")
+ "m10foo" ("margin: 10foo;")
+ "m10ex20em" ("margin: 10ex 20em;")
+ "m10x20e" ("margin: 10ex 20em;")
+ "m10x-5" ("margin: 10ex -5px;")
+ ;; Color values
+ "c#3" ("color: #333;")
+ "bd5#0rgb" ("border: 5px rgb(0,0,0);")
+ "bd5#20rgb" ("border: 5px rgb(32,32,32);")
+ "bd5#0s" ("border: 5px #000 solid;")
+ "bd5#2rgbs" ("border: 5px rgb(34,34,34) solid;")
+ ;; Unitless property
+ "lh2" ("line-height: 2;")
+ "fw400" ("font-weight: 400;")
+ ;;
+ "m0+p0-1p2e3x" ("margin: 0px;"
+ "padding: 0px 1% 2em 3ex;")
+ "p!+m10e!+f" ("padding: !important;"
+ "margin: 10em !important;"
+ "font: ;")
+ "fs" ("font-style: italic;")
+ "xxxxxx 0 auto 0e auto!" ("xxxxxx: 0px auto 0em auto !important;")
+ "p auto+m auto+bg+#F00 x.jpg 10 10 repeat-x"
+ ("padding: auto;"
+ "margin: auto;"
+ "background: #F00 url(x.jpg) 10px 10px repeat-x;")
+ "-bdrs" ("-webkit-border-radius: ;"
+ "-moz-border-radius: ;"
+ "border-radius: ;")
+ "-super-foo" ("-webkit-super-foo: ;"
+ "-moz-super-foo: ;"
+ "-ms-super-foo: ;"
+ "-o-super-foo: ;"
+ "super-foo: ;")
+ "-wm-trf" ("-webkit-transform: ;"
+ "-moz-transform: ;"
+ "transform: ;")
+ "@m print 1" ("@media print {"
+ " 1px"
+ "}")
+ "@i http://github.com/smihica/index.css"
+ ("@import url(http://github.com/smihica/index.css);")
+ )
+
+;; start
+(zencoding-test-cases) \ No newline at end of file
diff --git a/tools/json2hash b/tools/json2hash
new file mode 100755
index 0000000..8dbe9ae
--- /dev/null
+++ b/tools/json2hash
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import json
+import sys
+import os
+import re
+import argparse
+from cStringIO import StringIO
+
+class ApplicationException(Exception):
+ pass
+
+def pystr2elstrexp(s):
+ s = re.sub(r'^(u\'|\'|u\"|\")(.*)(\'|\")$', r'\2', repr(s))
+ output = re.sub(r'("|\\")', '\\"', s)
+ return u'"' + output + u'"'
+
+class Processor(object):
+
+ def __init__(self):
+ self.out = StringIO()
+
+ def _print(self, data):
+ _type = type(data)
+ if _type is dict:
+ self.out.write('(let ((tbl (make-hash-table :test \'equal)))\n')
+ for k, v in data.items():
+ self.out.write('(puthash ')
+ self.out.write(pystr2elstrexp(k))
+ self.out.write(' ')
+ self._print(v)
+ self.out.write(' tbl)\n')
+ self.out.write('tbl)')
+ elif _type is list:
+ self.out.write('(vector \n')
+ for v in data:
+ self._print(v)
+ self.out.write('\n')
+ self.out.write(')\n')
+ elif _type is bool:
+ self.out.write('t' if data else 'nil')
+ elif (_type is str or _type is unicode):
+ self.out.write(pystr2elstrexp(data))
+ else: # number ?
+ self.out.write(str(data))
+
+ def read(self, file):
+ data = json.load(file)
+ self._print(data)
+
+ def write(self, out):
+ out.write(self.out.getvalue())
+
+def main():
+ argparser = argparse.ArgumentParser()
+ argparser.add_argument('-o', type=str)
+ argparser.add_argument('--defvar', type=str)
+ argparser.add_argument('file', nargs='+', type=str)
+ options = argparser.parse_args()
+ if options.o:
+ out = open(options.o, 'w')
+ else:
+ out = sys.stdout
+ try:
+ p = Processor()
+ for file in options.file:
+ try:
+ f = open(os.path.abspath(file))
+ p.read(f)
+ finally:
+ f.close()
+ out.write(';; ' + str(options.o) + '\n')
+ out.write(';; This file is generated from ' + ','.join(options.file) + '\n')
+ out.write(';; Don\'t edit.\n')
+ if options.defvar:
+ out.write(u'(zencoding-defparameter ' + options.defvar + u'\n')
+ p.write(out)
+ if options.defvar:
+ out.write(')\n')
+ except:
+ if options.o:
+ out.close()
+ os.unlink(options.o)
+ raise
+ if options.o:
+ out.close()
+
+if __name__ == '__main__':
+ try:
+ main()
+ except ApplicationException as e:
+ print >>sys.stderr, e.message
diff --git a/zencoding-mode.el b/zencoding-mode.el
index 824b15c..1f7b54f 100644
--- a/zencoding-mode.el
+++ b/zencoding-mode.el
@@ -41,6 +41,8 @@
;; (add-to-list 'load-path "~/Emacs/zencoding/")
;; (require 'zencoding-mode)
;; (add-hook 'sgml-mode-hook 'zencoding-mode) ;; Auto-start on any markup modes
+;; (add-hook 'html-mode-hook 'zencoding-mode)
+;; (add-hook 'css-mode-hook 'zencoding-mode)
;;
;; Enable the minor mode with M-x zencoding-mode.
;;
@@ -56,6 +58,8 @@
;;
;; Modified by Lennart Borgman.
;;
+;;
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
@@ -67,6 +71,24 @@
(require 'cl)
+(defmacro zencoding-defparameter (symbol &optional initvalue docstring)
+ `(progn
+ (defvar ,symbol nil ,docstring)
+ (setq ,symbol ,initvalue)))
+
+(defun zencoding-join-string (lis joiner)
+ (mapconcat 'identity lis joiner))
+
+(defun zencoding-get-keys-of-hash (hash)
+ (let ((ks nil))
+ (maphash #'(lambda (k v) (setq ks (cons k ks))) hash)
+ ks))
+
+(defun zencoding-get-vals-of-hash (hash)
+ (let ((vs nil))
+ (maphash #'(lambda (k v) (setq vs (cons v vs))) hash)
+ vs))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Generic parsing macros and utilities
@@ -114,9 +136,2258 @@
(mapcar (lambda (ref) (match-string ref string))
(if (sequencep refs) refs (list refs)))
nil))
-
+;; src/snippets.el
+;; This file is generated from conf/snippets.json
+;; Don't edit.
+(zencoding-defparameter zencoding-snippets
+(let ((tbl (make-hash-table :test 'equal)))
+(puthash "html" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "snippets" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "!!!" "<!doctype html>" tbl)
+(puthash "!!!xxs" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" tbl)
+(puthash "cc:ie6" "<!--[if lte IE 6]>\n\t${child}\n<![endif]-->" tbl)
+(puthash "cc:ie" "<!--[if IE]>\n\t${child}\n<![endif]-->" tbl)
+(puthash "!!!xs" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" tbl)
+(puthash "!!!4t" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" tbl)
+(puthash "cc:noie" "<!--[if !IE]><!-->\n\t${child}\n<!--<![endif]-->" tbl)
+(puthash "!!!4s" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" tbl)
+(puthash "!!!xt" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" tbl)
+tbl) tbl)
+(puthash "aliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "a:link" "a href=http://" tbl)
+(puthash "doc4" "html>(head>meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"+title{Document})" tbl)
+(puthash "input:datetime-local" "input type=datetime-local" tbl)
+(puthash "input:reset" "input type=reset" tbl)
+(puthash "meta:vp" "meta name=viewport content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\"" tbl)
+(puthash "colg" "colgroup" tbl)
+(puthash "btn:s" "button type=submit" tbl)
+(puthash "btn:r" "button type=reset" tbl)
+(puthash "tr+" "tr>td" tbl)
+(puthash "adr" "address" tbl)
+(puthash "bdo:l" "bdo dir=ltr" tbl)
+(puthash "colgroup+" "colgroup>col" tbl)
+(puthash "btn:b" "button type=button" tbl)
+(puthash "form:post" "form action method=post" tbl)
+(puthash "bdo:r" "bdo dir=rtl" tbl)
+(puthash "fig" "figure" tbl)
+(puthash "input:radio" "input type=radio" tbl)
+(puthash "link:print" "link rel=stylesheet href=print.css media=print" tbl)
+(puthash "opt" "option" tbl)
+(puthash "input:i" "input:image" tbl)
+(puthash "figc" "figcaption" tbl)
+(puthash "input:f" "input:file" tbl)
+(puthash "input:c" "input:checkbox" tbl)
+(puthash "input:b" "input:button" tbl)
+(puthash "input:t" "input" tbl)
+(puthash "input:p" "input:password" tbl)
+(puthash "input:s" "input:submit" tbl)
+(puthash "input:r" "input:radio" tbl)
+(puthash "ifr" "iframe" tbl)
+(puthash "emb" "embed" tbl)
+(puthash "optg+" "optgroup>option" tbl)
+(puthash "cmd" "command" tbl)
+(puthash "html:5" "!!!+doc lang=en" tbl)
+(puthash "link:atom" "link rel=alternate type=\"application/atom+xml\" title=Atom href=atom.xml" tbl)
+(puthash "table+" "table>tr>td" tbl)
+(puthash "art" "article" tbl)
+(puthash "input:search" "input type=search" tbl)
+(puthash "area:r" "area shape=rect coords href alt" tbl)
+(puthash "area:p" "area shape=poly coords href alt" tbl)
+(puthash "input:date" "input type=date" tbl)
+(puthash "input:button" "input type=button" tbl)
+(puthash "area:d" "area shape=default href alt" tbl)
+(puthash "area:c" "area shape=circle coords href alt" tbl)
+(puthash "out" "output" tbl)
+(puthash "ftr" "footer" tbl)
+(puthash "dlg" "dialog" tbl)
+(puthash "script:src" "script src" tbl)
+(puthash "form:get" "form action method=get" tbl)
+(puthash "meta:utf" "meta http-equiv=Content-Type content=\"text/html;charset=UTF-8\"" tbl)
+(puthash "input:time" "input type=time" tbl)
+(puthash "menu:toolbar" "menu type=toolbar" tbl)
+(puthash "prog" "progress" tbl)
+(puthash "input:email" "input type=email" tbl)
+(puthash "input:submit" "input type=submit" tbl)
+(puthash "leg" "legend" tbl)
+(puthash "ol+" "ol>li" tbl)
+(puthash "optgroup+" "optgroup>option" tbl)
+(puthash "bq" "blockquote" tbl)
+(puthash "src" "source" tbl)
+(puthash "obj" "object" tbl)
+(puthash "dl+" "dl>dt+dd" tbl)
+(puthash "acr" "acronym" tbl)
+(puthash "input:password" "input type=password" tbl)
+(puthash "html:4t" "!!!4t+doc4 lang=en" tbl)
+(puthash "input:file" "input type=file" tbl)
+(puthash "html:4s" "!!!4s+doc4 lang=en" tbl)
+(puthash "tarea" "textarea" tbl)
+(puthash "link:favicon" "link icon rel=shortcut type=image/x-icon href=favicon.ico" tbl)
+(puthash "input:number" "input type=number" tbl)
+(puthash "input:range" "input type=range" tbl)
+(puthash "input:image" "input type=image src alt" tbl)
+(puthash "ul+" "ul>li" tbl)
+(puthash "html:xxs" "!!!xxs+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en" tbl)
+(puthash "input:month" "input type=month" tbl)
+(puthash "fset" "fieldset" tbl)
+(puthash "meta:win" "meta http-equiv=Content-Type content=\"text/html;charset=windows-1251\"" tbl)
+(puthash "menu:t" "menu:toolbar" tbl)
+(puthash "menu:c" "menu:context" tbl)
+(puthash "link:rss" "link rel=alternate type=application/rss+xml title=RSS href=rss.xml" tbl)
+(puthash "select+" "select>option" tbl)
+(puthash "hdr" "header" tbl)
+(puthash "cap" "caption" tbl)
+(puthash "det" "details" tbl)
+(puthash "link:touch" "link rel=apple-touch-icon href=favicon.png" tbl)
+(puthash "str" "strong" tbl)
+(puthash "link:css" "link rel=stylesheet href=style.css" tbl)
+(puthash "input:week" "input type=week" tbl)
+(puthash "optg" "optgroup" tbl)
+(puthash "input:datetime" "input type=datetime" tbl)
+(puthash "input:h" "input:hidden" tbl)
+(puthash "!" "html:5" tbl)
+(puthash "html:xml" "html xmlns=http://www.w3.org/1999/xhtml" tbl)
+(puthash "btn" "button" tbl)
+(puthash "input:url" "input type=url" tbl)
+(puthash "menu:context" "menu type=context" tbl)
+(puthash "colg+" "colgroup>col" tbl)
+(puthash "input:color" "input type=color" tbl)
+(puthash "meta:compat" "meta http-equiv=X-UA-Compatible content=\"IE=edge,chrome=1\"" tbl)
+(puthash "input:hidden" "input type=hidden" tbl)
+(puthash "a:mail" "a href=mailto:" tbl)
+(puthash "html:xs" "!!!xs+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en" tbl)
+(puthash "html:xt" "!!!xt+doc4 xmlns=http://www.w3.org/1999/xhtml xml:lang=en" tbl)
+(puthash "datal" "datalist" tbl)
+(puthash "map+" "map>area" tbl)
+(puthash "kg" "keygen" tbl)
+(puthash "doc" "html>(head>meta charset=UTF-8+title{Document})+body" tbl)
+(puthash "datag" "datagrid" tbl)
+(puthash "input:text" "input" tbl)
+(puthash "input:checkbox" "input type=checkbox" tbl)
+(puthash "fst" "fieldset" tbl)
+(puthash "sect" "section" tbl)
+tbl) tbl)
+tbl) tbl)
+(puthash "css" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "snippets" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "bdls" "border-left-style:|;" tbl)
+(puthash "bdlw" "border-left-width:|;" tbl)
+(puthash "bdli" "border-left-image:url(|);" tbl)
+(puthash "bdlc" "border-left-color:${1:#000};" tbl)
+(puthash "whsc" "white-space-collapse:|;" tbl)
+(puthash "bdtlrs" "border-top-left-radius:|;" tbl)
+(puthash "bdblrs" "border-bottom-left-radius:|;" tbl)
+(puthash "d:tbc" "display:table-cell;" tbl)
+(puthash "wow:n" "word-wrap:none;" tbl)
+(puthash "tw" "text-wrap:|;" tbl)
+(puthash "tt" "text-transform:${1:uppercase};" tbl)
+(puthash "tr" "text-replace:|;" tbl)
+(puthash "to" "text-outline:|;" tbl)
+(puthash "wow:u" "word-wrap:unrestricted;" tbl)
+(puthash "tj" "text-justify:|;" tbl)
+(puthash "wow:s" "word-wrap:suppress;" tbl)
+(puthash "th" "text-height:|;" tbl)
+(puthash "d:tbr" "display:table-row;" tbl)
+(puthash "td" "text-decoration:${1:none};" tbl)
+(puthash "te" "text-emphasis:|;" tbl)
+(puthash "bgc:t" "background-color:transparent;" tbl)
+(puthash "list:lr" "list-style-type:lower-roman;" tbl)
+(puthash "bdl+" "border-left:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "bxz" "box-sizing:${1:border-box};" tbl)
+(puthash "bdbk:c" "border-break:close;" tbl)
+(puthash "bgbk:bb" "background-break:bounding-box;" tbl)
+(puthash "f" "font:|;" tbl)
+(puthash "list" "list-style-type:|;" tbl)
+(puthash "trf" "transform:|;" tbl)
+(puthash "p" "padding:|;" tbl)
+(puthash "bdbi:n" "border-bottom-image:none;" tbl)
+(puthash "bdf:r" "border-fit:repeat;" tbl)
+(puthash "trs" "transition:${1:prop} ${2:time};" tbl)
+(puthash "bdrst" "border-right-style:|;" tbl)
+(puthash "zm" "zoom:1;" tbl)
+(puthash "to:n" "text-outline:none;" tbl)
+(puthash "trf:t" "transform: translate(${1:x}, ${2:y});" tbl)
+(puthash "animfm:bt" "animation-fill-mode:both;" tbl)
+(puthash "animfm:bh" "animation-fill-mode:both;" tbl)
+(puthash "bgcp:cb" "background-clip:content-box;" tbl)
+(puthash "lisp:o" "list-style-position:outside;" tbl)
+(puthash "lisp:i" "list-style-position:inside;" tbl)
+(puthash "d:tbclg" "display:table-column-group;" tbl)
+(puthash "bdf" "border-fit:${1:repeat};" tbl)
+(puthash "@f" "@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}" tbl)
+(puthash "bdc" "border-color:${1:#000};" tbl)
+(puthash "d:rbt" "display:ruby-text;" tbl)
+(puthash "bdl" "border-left:|;" tbl)
+(puthash "@i" "@import url(|);" tbl)
+(puthash "bdi" "border-image:url(|);" tbl)
+(puthash "bgsz" "background-size:|;" tbl)
+(puthash "@m" "@media ${1:screen} {\n\t|\n}" tbl)
+(puthash "fef:eb" "font-effect:emboss;" tbl)
+(puthash "bdt" "border-top:|;" tbl)
+(puthash "bdw" "border-width:|;" tbl)
+(puthash "pgbb" "page-break-before:|;" tbl)
+(puthash "fef:eg" "font-effect:engrave;" tbl)
+(puthash "bds" "border-style:|;" tbl)
+(puthash "bdr" "border-right:|;" tbl)
+(puthash "pgbi" "page-break-inside:|;" tbl)
+(puthash "bgi" "background-image:url(|);" tbl)
+(puthash "mr" "margin-right:|;" tbl)
+(puthash "ta-lst" "text-align-last:|;" tbl)
+(puthash "te:c" "text-emphasis:circle;" tbl)
+(puthash "te:b" "text-emphasis:before;" tbl)
+(puthash "q:n" "quotes:none;" tbl)
+(puthash "te:n" "text-emphasis:none;" tbl)
+(puthash "ta:l" "text-align:left;" tbl)
+(puthash "bdbs:n" "border-bottom-style:none;" tbl)
+(puthash "bt" "border-top:|;" tbl)
+(puthash "bg:ie" "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');" tbl)
+(puthash "d:li" "display:list-item;" tbl)
+(puthash "tj:k" "text-justify:kashida;" tbl)
+(puthash "bd+" "border:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "fems:ac" "font-emphasize-style:accent;" tbl)
+(puthash "fst:n" "font-stretch:normal;" tbl)
+(puthash "fst:c" "font-stretch:condensed;" tbl)
+(puthash "fst:e" "font-stretch:expanded;" tbl)
+(puthash "wid" "widows:|;" tbl)
+(puthash "bdts:n" "border-top-style:none;" tbl)
+(puthash "fef" "font-effect:|;" tbl)
+(puthash "cur:t" "cursor:text;" tbl)
+(puthash "bdsp" "border-spacing:|;" tbl)
+(puthash "cur:p" "cursor:pointer;" tbl)
+(puthash "animps:r" "animation-play-state:running;" tbl)
+(puthash "animps:p" "animation-play-state:paused;" tbl)
+(puthash "maw:n" "max-width:none;" tbl)
+(puthash "fw:n" "font-weight:normal;" tbl)
+(puthash "bdtri:n" "border-top-right-image:none;" tbl)
+(puthash "fw:b" "font-weight:bold;" tbl)
+(puthash "bdtri:c" "border-top-right-image:continue;" tbl)
+(puthash "cur:a" "cursor:auto;" tbl)
+(puthash "cur:c" "cursor:crosshair;" tbl)
+(puthash "bdls:n" "border-left-style:none;" tbl)
+(puthash "tw:u" "text-wrap:unrestricted;" tbl)
+(puthash "lts" "letter-spacing:|;" tbl)
+(puthash "c:ra" "color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});" tbl)
+(puthash "va:sub" "vertical-align:sub;" tbl)
+(puthash "tw:s" "text-wrap:suppress;" tbl)
+(puthash "ti" "text-indent:|;" tbl)
+(puthash "pgbi:av" "page-break-inside:avoid;" tbl)
+(puthash "tj:t" "text-justify:tibetan;" tbl)
+(puthash "bgc" "background-color:${1:#fff};" tbl)
+(puthash "trf:tx" "transform: translateX(${1:x});" tbl)
+(puthash "trf:ty" "transform: translateY(${1:y});" tbl)
+(puthash "va:sup" "vertical-align:super;" tbl)
+(puthash "va:bl" "vertical-align:baseline;" tbl)
+(puthash "tw:n" "text-wrap:normal;" tbl)
+(puthash "mb" "margin-bottom:|;" tbl)
+(puthash "ml" "margin-left:|;" tbl)
+(puthash "bdtrrs" "border-top-right-radius:|;" tbl)
+(puthash "va:m" "vertical-align:middle;" tbl)
+(puthash "mt" "margin-top:|;" tbl)
+(puthash "bds:dt" "border-style:dotted;" tbl)
+(puthash "v" "visibility:${1:hidden};" tbl)
+(puthash "@import" "@import url(|);" tbl)
+(puthash "ta" "text-align:${1:left};" tbl)
+(puthash "pos:r" "position:relative;" tbl)
+(puthash "va:b" "vertical-align:bottom;" tbl)
+(puthash "tsh+" "text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};" tbl)
+(puthash "cps:t" "caption-side:top;" tbl)
+(puthash "cps:b" "caption-side:bottom;" tbl)
+(puthash "list:dclz" "list-style-type:decimal-leading-zero;" tbl)
+(puthash "f+" "font:${1:1em} ${2:Arial,sans-serif};" tbl)
+(puthash "animic:i" "animation-iteration-count:infinite;" tbl)
+(puthash "bd:n" "border:none;" tbl)
+(puthash "!" "!important" tbl)
+(puthash "bdl:n" "border-left:none;" tbl)
+(puthash "bgsz:a" "background-size:auto;" tbl)
+(puthash "bdlen:a" "border-length:auto;" tbl)
+(puthash "tw:no" "text-wrap:none;" tbl)
+(puthash "bdtri" "border-top-right-image:url(|);" tbl)
+(puthash "ovs" "overflow-style:${1:scrollbar};" tbl)
+(puthash "mar" "max-resolution:${1:res};" tbl)
+(puthash "w" "width:|;" tbl)
+(puthash "maw" "max-width:|;" tbl)
+(puthash "fw" "font-weight:|;" tbl)
+(puthash "ovx" "overflow-x:${1:hidden};" tbl)
+(puthash "ovy" "overflow-y:${1:hidden};" tbl)
+(puthash "ff" "font-family:|;" tbl)
+(puthash "ov" "overflow:${1:hidden};" tbl)
+(puthash "wfsm:sa" "-webkit-font-smoothing:subpixel-antialiased;" tbl)
+(puthash "mah" "max-height:|;" tbl)
+(puthash "cnt:oq" "content:open-quote;" tbl)
+(puthash "fl" "float:${1:left};" tbl)
+(puthash "trsp" "transition-property:${1:prop};" tbl)
+(puthash "va:tb" "vertical-align:text-bottom;" tbl)
+(puthash "h:a" "height:auto;" tbl)
+(puthash "d:ib" "display:inline-block;" tbl)
+(puthash "bgo:cb" "background-origin:content-box;" tbl)
+(puthash "q" "quotes:|;" tbl)
+(puthash "tal:l" "text-align-last:left;" tbl)
+(puthash "va:tt" "vertical-align:text-top;" tbl)
+(puthash "fef:o" "font-effect:outline;" tbl)
+(puthash "ct:ncq" "content:no-close-quote;" tbl)
+(puthash "wow:nm" "word-wrap:normal;" tbl)
+(puthash "ct:noq" "content:no-open-quote;" tbl)
+(puthash "tov:c" "text-overflow:clip;" tbl)
+(puthash "colm" "columns:|;" tbl)
+(puthash "cur:d" "cursor:default;" tbl)
+(puthash "bdli:n" "border-left-image:none;" tbl)
+(puthash "d:tbhg" "display:table-header-group;" tbl)
+(puthash "bga:s" "background-attachment:scroll;" tbl)
+(puthash "tsh" "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};" tbl)
+(puthash "td:n" "text-decoration:none;" tbl)
+(puthash "lh" "line-height:|;" tbl)
+(puthash "fst:sc" "font-stretch:semi-condensed;" tbl)
+(puthash "fst:ec" "font-stretch:extra-condensed;" tbl)
+(puthash "fsm:a" "font-smooth:auto;" tbl)
+(puthash "bdlc:t" "border-left-color:transparent;" tbl)
+(puthash "bga:f" "background-attachment:fixed;" tbl)
+(puthash "fsm:n" "font-smooth:never;" tbl)
+(puthash "anim" "animation:|;" tbl)
+(puthash "tbl:f" "table-layout:fixed;" tbl)
+(puthash "tbl:a" "table-layout:auto;" tbl)
+(puthash "bdci:n" "border-corner-image:none;" tbl)
+(puthash "bxsh:ra" "box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});" tbl)
+(puthash "whsc:k" "white-space-collapse:keep-all;" tbl)
+(puthash "bdci:c" "border-corner-image:continue;" tbl)
+(puthash "va:t" "vertical-align:top;" tbl)
+(puthash "colmc" "column-count:|;" tbl)
+(puthash "colmf" "column-fill:|;" tbl)
+(puthash "colmg" "column-gap:|;" tbl)
+(puthash "bdb:n" "border-bottom:none;" tbl)
+(puthash "l" "left:|;" tbl)
+(puthash "lisp" "list-style-position:|;" tbl)
+(puthash "colmr" "column-rule:|;" tbl)
+(puthash "colms" "column-span:|;" tbl)
+(puthash "colmw" "column-width:|;" tbl)
+(puthash "bdbi" "border-bottom-image:url(|);" tbl)
+(puthash "bdbk" "border-break:${1:close};" tbl)
+(puthash "pgba:r" "page-break-after:right;" tbl)
+(puthash "wfsm" "-webkit-font-smoothing:${1:antialiased};" tbl)
+(puthash "bdbc" "border-bottom-color:${1:#000};" tbl)
+(puthash "ec" "empty-cells:|;" tbl)
+(puthash "te:ac" "text-emphasis:accent;" tbl)
+(puthash "fs" "font-style:${1:italic};" tbl)
+(puthash "l:a" "left:auto;" tbl)
+(puthash "bdr:n" "border-right:none;" tbl)
+(puthash "bdrst:n" "border-right-style:none;" tbl)
+(puthash "bdbs" "border-bottom-style:|;" tbl)
+(puthash "bdbw" "border-bottom-width:|;" tbl)
+(puthash "whsc:ba" "white-space-collapse:break-all;" tbl)
+(puthash "@kf" "@-webkit-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}" tbl)
+(puthash "fv" "font-variant:|;" tbl)
+(puthash "lisi" "list-style-image:|;" tbl)
+(puthash "whsc:bs" "white-space-collapse:break-strict;" tbl)
+(puthash "b:a" "bottom:auto;" tbl)
+(puthash "bdt+" "border-top:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "fz" "font-size:|;" tbl)
+(puthash "ta:c" "text-align:center;" tbl)
+(puthash "bdf:sp" "border-fit:space;" tbl)
+(puthash "ovy:a" "overflow-y:auto;" tbl)
+(puthash "bdb+" "border-bottom:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "d:tb" "display:table;" tbl)
+(puthash "bdf:st" "border-fit:stretch;" tbl)
+(puthash "ti:-" "text-indent:-9999px;" tbl)
+(puthash "c:r" "color:rgb(${1:0}, ${2:0}, ${3:0});" tbl)
+(puthash "ta:j" "text-align:justify;" tbl)
+(puthash "ovy:h" "overflow-y:hidden;" tbl)
+(puthash "cnt:cs" "content:counters(|);" tbl)
+(puthash "orp" "orphans:|;" tbl)
+(puthash "cnt:cq" "content:close-quote;" tbl)
+(puthash "ovy:s" "overflow-y:scroll;" tbl)
+(puthash "ta:r" "text-align:right;" tbl)
+(puthash "bdf:sc" "border-fit:scale;" tbl)
+(puthash "ovy:v" "overflow-y:visible;" tbl)
+(puthash "ori" "orientation:|;" tbl)
+(puthash "fem" "font-emphasize:|;" tbl)
+(puthash "cnt:n" "content:normal;" tbl)
+(puthash "bdts" "border-top-style:|;" tbl)
+(puthash "bdtw" "border-top-width:|;" tbl)
+(puthash "cnt:c" "content:counter(|);" tbl)
+(puthash "cnt:a" "content:attr(|);" tbl)
+(puthash "bdtc" "border-top-color:${1:#000};" tbl)
+(puthash "cnt:noq" "content:no-open-quote;" tbl)
+(puthash "td:u" "text-decoration:underline;" tbl)
+(puthash "bdti" "border-top-image:url(|);" tbl)
+(puthash "bdtli" "border-top-left-image:url(|);" tbl)
+(puthash "bdf:of" "border-fit:overflow;" tbl)
+(puthash "fl:l" "float:left;" tbl)
+(puthash "tt:n" "text-transform:none;" tbl)
+(puthash "fl:n" "float:none;" tbl)
+(puthash "bdbrrs" "border-bottom-right-radius:|;" tbl)
+(puthash "bdf:ow" "border-fit:overwrite;" tbl)
+(puthash "tt:l" "text-transform:lowercase;" tbl)
+(puthash "fl:r" "float:right;" tbl)
+(puthash "tt:c" "text-transform:capitalize;" tbl)
+(puthash "tov" "text-overflow:${1:ellipsis};" tbl)
+(puthash "ec:s" "empty-cells:show;" tbl)
+(puthash "bgr:sp" "background-repeat:space;" tbl)
+(puthash "ec:h" "empty-cells:hide;" tbl)
+(puthash "tt:u" "text-transform:uppercase;" tbl)
+(puthash "animdir:ar" "animation-direction:alternate-reverse;" tbl)
+(puthash "bdti:n" "border-top-image:none;" tbl)
+(puthash "trstf" "transition-timing-function:${1:tfunc};" tbl)
+(puthash "colmrc" "column-rule-color:|;" tbl)
+(puthash "fst:ee" "font-stretch:extra-expanded;" tbl)
+(puthash "bdbri" "border-bottom-right-image:url(|);" tbl)
+(puthash "trf:r" "transform: rotate(${1:angle});" tbl)
+(puthash "colmrs" "column-rule-style:|;" tbl)
+(puthash "colmrw" "column-rule-width:|;" tbl)
+(puthash "rsz" "resize:|;" tbl)
+(puthash "d:cp" "display:compact;" tbl)
+(puthash "b" "bottom:|;" tbl)
+(puthash "fef:n" "font-effect:none;" tbl)
+(puthash "bdt:n" "border-top:none;" tbl)
+(puthash "to+" "text-outline:${1:0} ${2:0} ${3:#000};" tbl)
+(puthash "r" "right:|;" tbl)
+(puthash "bdbri:n" "border-bottom-right-image:none;" tbl)
+(puthash "tsh:r" "text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});" tbl)
+(puthash "animdel" "animation-delay:${1:time};" tbl)
+(puthash "pgbi:au" "page-break-inside:auto;" tbl)
+(puthash "bdbri:c" "border-bottom-right-image:continue;" tbl)
+(puthash "animic" "animation-iteration-count:${1:1};" tbl)
+(puthash "tsh:n" "text-shadow:none;" tbl)
+(puthash "fv:sc" "font-variant:small-caps;" tbl)
+(puthash "bds:i" "border-style:inset;" tbl)
+(puthash "mih" "min-height:|;" tbl)
+(puthash "r:a" "right:auto;" tbl)
+(puthash "bdrc:t" "border-right-color:transparent;" tbl)
+(puthash "fems:ds" "font-emphasize-style:disc;" tbl)
+(puthash "fems:dt" "font-emphasize-style:dot;" tbl)
+(puthash "zoo" "zoom:1;" tbl)
+(puthash "lis" "list-style:|;" tbl)
+(puthash "mir" "min-resolution:${1:res};" tbl)
+(puthash "miw" "min-width:|;" tbl)
+(puthash "whs" "white-space:|;" tbl)
+(puthash "bdtc:t" "border-top-color:transparent;" tbl)
+(puthash "op:ms" "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';" tbl)
+(puthash "bds:dtds" "border-style:dot-dash;" tbl)
+(puthash "bdb" "border-bottom:|;" tbl)
+(puthash "m" "margin:|;" tbl)
+(puthash "bgcp:nc" "background-clip:no-clip;" tbl)
+(puthash "wow" "word-wrap:|;" tbl)
+(puthash "w:a" "width:auto;" tbl)
+(puthash "bg:n" "background:none;" tbl)
+(puthash "ml:a" "margin-left:auto;" tbl)
+(puthash "bds:dtdtds" "border-style:dot-dot-dash;" tbl)
+(puthash "animtf:cb" "animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});" tbl)
+(puthash "pgba" "page-break-after:|;" tbl)
+(puthash "ff:s" "font-family:serif;" tbl)
+(puthash "d:rbb" "display:ruby-base;" tbl)
+(puthash "tj:d" "text-justify:distribute;" tbl)
+(puthash "tj:a" "text-justify:auto;" tbl)
+(puthash "trfo" "transform-origin:|;" tbl)
+(puthash "ff:f" "font-family:fantasy;" tbl)
+(puthash "trfs" "transform-style:${1:preserve-3d};" tbl)
+(puthash "fems:c" "font-emphasize-style:circle;" tbl)
+(puthash "ff:c" "font-family:cursive;" tbl)
+(puthash "d:itb" "display:inline-table;" tbl)
+(puthash "fems:n" "font-emphasize-style:none;" tbl)
+(puthash "ff:m" "font-family:monospace;" tbl)
+(puthash "pgba:au" "page-break-after:auto;" tbl)
+(puthash "bdri:n" "border-right-image:none;" tbl)
+(puthash "mt:a" "margin-top:auto;" tbl)
+(puthash "tbl" "table-layout:|;" tbl)
+(puthash "wob:l" "word-break:loose;" tbl)
+(puthash "animfm:b" "animation-fill-mode:backwards;" tbl)
+(puthash "animfm:f" "animation-fill-mode:forwards;" tbl)
+(puthash "td:o" "text-decoration:overline;" tbl)
+(puthash "td:l" "text-decoration:line-through;" tbl)
+(puthash "bxz:bb" "box-sizing:border-box;" tbl)
+(puthash "bxsh:n" "box-shadow:none;" tbl)
+(puthash "h" "height:|;" tbl)
+(puthash "pgba:al" "page-break-after:always;" tbl)
+(puthash "animtf:e" "animation-timing-function:ease;" tbl)
+(puthash "animtf:l" "animation-timing-function:linear;" tbl)
+(puthash "bxsh:r" "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});" tbl)
+(puthash "fw:br" "font-weight:bolder;" tbl)
+(puthash "ovs:p" "overflow-style:panner;" tbl)
+(puthash "ovs:s" "overflow-style:scrollbar;" tbl)
+(puthash "fv:n" "font-variant:normal;" tbl)
+(puthash "ovs:a" "overflow-style:auto;" tbl)
+(puthash "m:a" "margin:auto;" tbl)
+(puthash "animdir" "animation-direction:${1:normal};" tbl)
+(puthash "ovs:m" "overflow-style:move;" tbl)
+(puthash "ol:n" "outline:none;" tbl)
+(puthash "fsm:aw" "font-smooth:always;" tbl)
+(puthash "whs:nw" "white-space:nowrap;" tbl)
+(puthash "wos" "word-spacing:|;" tbl)
+(puthash "wob" "word-break:|;" tbl)
+(puthash "pgbb:au" "page-break-before:auto;" tbl)
+(puthash "op:ie" "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);" tbl)
+(puthash "rsz:h" "resize:horizontal;" tbl)
+(puthash "bgcp" "background-clip:${1:padding-box};" tbl)
+(puthash "fst:ue" "font-stretch:ultra-expanded;" tbl)
+(puthash "fst:uc" "font-stretch:ultra-condensed;" tbl)
+(puthash "pgbb:al" "page-break-before:always;" tbl)
+(puthash "c" "color:${1:#000};" tbl)
+(puthash "bdrc" "border-right-color:${1:#000};" tbl)
+(puthash "bdtli:n" "border-top-left-image:none;" tbl)
+(puthash "bdtli:c" "border-top-left-image:continue;" tbl)
+(puthash "list:ur" "list-style-type:upper-roman;" tbl)
+(puthash "fst:se" "font-stretch:semi-expanded;" tbl)
+(puthash "coi" "counter-increment:|;" tbl)
+(puthash "tr:n" "text-replace:none;" tbl)
+(puthash "bgbk:c" "background-break:continuous;" tbl)
+(puthash "ov:a" "overflow:auto;" tbl)
+(puthash "te:a" "text-emphasis:after;" tbl)
+(puthash "cm" "/* |${child} */" tbl)
+(puthash "cl" "clear:${1:both};" tbl)
+(puthash "femp" "font-emphasize-position:|;" tbl)
+(puthash "ov:h" "overflow:hidden;" tbl)
+(puthash "wob:bs" "word-break:break-strict;" tbl)
+(puthash "ov:v" "overflow:visible;" tbl)
+(puthash "ov:s" "overflow:scroll;" tbl)
+(puthash "bxsh" "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};" tbl)
+(puthash "cp" "clip:|;" tbl)
+(puthash "ct" "content:|;" tbl)
+(puthash "pr" "padding-right:|;" tbl)
+(puthash "cp:r" "clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});" tbl)
+(puthash "pt" "padding-top:|;" tbl)
+(puthash "ori:p" "orientation:portrait;" tbl)
+(puthash "pb" "padding-bottom:|;" tbl)
+(puthash "cp:a" "clip:auto;" tbl)
+(puthash "bdf:c" "border-fit:clip;" tbl)
+(puthash "ori:l" "orientation:landscape;" tbl)
+(puthash "pl" "padding-left:|;" tbl)
+(puthash "bdci" "border-corner-image:url(|);" tbl)
+(puthash "bdcl" "border-collapse:|;" tbl)
+(puthash "cor" "counter-reset:|;" tbl)
+(puthash "bgsz:cv" "background-size:cover;" tbl)
+(puthash "mb:a" "margin-bottom:auto;" tbl)
+(puthash "trf:sky" "transform: skewY(${1:angle});" tbl)
+(puthash "trf:skx" "transform: skewX(${1:angle});" tbl)
+(puthash "d:rb" "display:ruby;" tbl)
+(puthash "bdlen" "border-length:|;" tbl)
+(puthash "d:ri" "display:run-in;" tbl)
+(puthash "va" "vertical-align:${1:top};" tbl)
+(puthash "bds:db" "border-style:double;" tbl)
+(puthash "d:tbfg" "display:table-footer-group;" tbl)
+(puthash "bds:ds" "border-style:dashed;" tbl)
+(puthash "lis:n" "list-style:none;" tbl)
+(puthash "d:b" "display:block;" tbl)
+(puthash "tal:a" "text-align-last:auto;" tbl)
+(puthash "tal:c" "text-align-last:center;" tbl)
+(puthash "d:i" "display:inline;" tbl)
+(puthash "pgba:l" "page-break-after:left;" tbl)
+(puthash "bgbk:eb" "background-break:each-box;" tbl)
+(puthash "d:n" "display:none;" tbl)
+(puthash "tal:r" "text-align-last:right;" tbl)
+(puthash "tj:iw" "text-justify:inter-word;" tbl)
+(puthash "trf:sc" "transform: scale(${1:x}, ${2:y});" tbl)
+(puthash "olc:i" "outline-color:invert;" tbl)
+(puthash "bgr:x" "background-repeat:repeat-x;" tbl)
+(puthash "bgr:y" "background-repeat:repeat-y;" tbl)
+(puthash "bgr:n" "background-repeat:no-repeat;" tbl)
+(puthash "cnt:ncq" "content:no-close-quote;" tbl)
+(puthash "list:c" "list-style-type:circle;" tbl)
+(puthash "list:d" "list-style-type:disc;" tbl)
+(puthash "bdbli:c" "border-bottom-left-image:continue;" tbl)
+(puthash "bdbli:n" "border-bottom-left-image:none;" tbl)
+(puthash "list:n" "list-style-type:none;" tbl)
+(puthash "list:s" "list-style-type:square;" tbl)
+(puthash "mah:n" "max-height:none;" tbl)
+(puthash "bgr:rd" "background-repeat:round;" tbl)
+(puthash "th:t" "text-height:text-size;" tbl)
+(puthash "d:rbtg" "display:ruby-text-group;" tbl)
+(puthash "bdc:t" "border-color:transparent;" tbl)
+(puthash "th:f" "text-height:font-size;" tbl)
+(puthash "th:a" "text-height:auto;" tbl)
+(puthash "ct:cq" "content:close-quote;" tbl)
+(puthash "ct:cs" "content:counters(|);" tbl)
+(puthash "th:m" "text-height:max-size;" tbl)
+(puthash "animdir:a" "animation-direction:alternate;" tbl)
+(puthash "bxz:cb" "box-sizing:content-box;" tbl)
+(puthash "rsz:n" "resize:none;" tbl)
+(puthash "cur" "cursor:${1:pointer};" tbl)
+(puthash "whs:p" "white-space:pre;" tbl)
+(puthash "rsz:b" "resize:both;" tbl)
+(puthash "animdir:n" "animation-direction:normal;" tbl)
+(puthash "fw:lr" "font-weight:lighter;" tbl)
+(puthash "whsc:n" "white-space-collapse:normal;" tbl)
+(puthash "animtf:eio" "animation-timing-function:ease-in-out;" tbl)
+(puthash "animdir:r" "animation-direction:reverse;" tbl)
+(puthash "te:ds" "text-emphasis:disc;" tbl)
+(puthash "te:dt" "text-emphasis:dot;" tbl)
+(puthash "whs:n" "white-space:normal;" tbl)
+(puthash "whsc:l" "white-space-collapse:loose;" tbl)
+(puthash "rsz:v" "resize:vertical;" tbl)
+(puthash "wob:ba" "word-break:break-all;" tbl)
+(puthash "list:dc" "list-style-type:decimal;" tbl)
+(puthash "d:tbrg" "display:table-row-group;" tbl)
+(puthash "tov:e" "text-overflow:ellipsis;" tbl)
+(puthash "mr:a" "margin-right:auto;" tbl)
+(puthash "pos" "position:${1:relative};" tbl)
+(puthash "fems" "font-emphasize-style:|;" tbl)
+(puthash "d" "display:${1:block};" tbl)
+(puthash "@media" "@media ${1:screen} {\n\t|\n}" tbl)
+(puthash "bgi:n" "background-image:none;" tbl)
+(puthash "wfsm:s" "-webkit-font-smoothing:subpixel-antialiased;" tbl)
+(puthash "q:en" "quotes:'\\201C' '\\201D' '\\2018' '\\2019';" tbl)
+(puthash "wfsm:n" "-webkit-font-smoothing:none;" tbl)
+(puthash "t" "top:|;" tbl)
+(puthash "ovs:mq" "overflow-style:marquee;" tbl)
+(puthash "wfsm:a" "-webkit-font-smoothing:antialiased;" tbl)
+(puthash "animtf" "animation-timing-function:${1:linear};" tbl)
+(puthash "bgbk" "background-break:|;" tbl)
+(puthash "olo" "outline-offset:|;" tbl)
+(puthash "ols" "outline-style:|;" tbl)
+(puthash "olw" "outline-width:|;" tbl)
+(puthash "cnt" "content:'|';" tbl)
+(puthash "bg+" "background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};" tbl)
+(puthash "bdcl:s" "border-collapse:separate;" tbl)
+(puthash "bdcl:c" "border-collapse:collapse;" tbl)
+(puthash "anim-" "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};" tbl)
+(puthash "bgsz:ct" "background-size:contain;" tbl)
+(puthash "bd" "border:|;" tbl)
+(puthash "wob:n" "word-break:normal;" tbl)
+(puthash "bg" "background:|;" tbl)
+(puthash "wob:k" "word-break:keep-all;" tbl)
+(puthash "tj:ic" "text-justify:inter-cluster;" tbl)
+(puthash "bb" "border-bottom:|;" tbl)
+(puthash "bl" "border-left:|;" tbl)
+(puthash "tj:ii" "text-justify:inter-ideograph;" tbl)
+(puthash "t:a" "top:auto;" tbl)
+(puthash "bgcp:bb" "background-clip:border-box;" tbl)
+(puthash "ff:ss" "font-family:sans-serif;" tbl)
+(puthash "br" "border-right:|;" tbl)
+(puthash "bga" "background-attachment:|;" tbl)
+(puthash "ol" "outline:|;" tbl)
+(puthash "cl:r" "clear:right;" tbl)
+(puthash "q:ru" "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';" tbl)
+(puthash "bgo" "background-origin:|;" tbl)
+(puthash "bgp" "background-position:${1:0} ${2:0};" tbl)
+(puthash "bgr" "background-repeat:|;" tbl)
+(puthash "cl:n" "clear:none;" tbl)
+(puthash "cl:l" "clear:left;" tbl)
+(puthash "cl:b" "clear:both;" tbl)
+(puthash "animn" "animation-name:${1:none};" tbl)
+(puthash "op" "opacity:|;" tbl)
+(puthash "fs:o" "font-style:oblique;" tbl)
+(puthash "fs:n" "font-style:normal;" tbl)
+(puthash "bds:h" "border-style:hidden;" tbl)
+(puthash "bdrw" "border-right-width:|;" tbl)
+(puthash "bds:n" "border-style:none;" tbl)
+(puthash "bds:o" "border-style:outset;" tbl)
+(puthash "fs:i" "font-style:italic;" tbl)
+(puthash "ct:oq" "content:open-quote;" tbl)
+(puthash "bds:g" "border-style:groove;" tbl)
+(puthash "olc" "outline-color:${1:#000};" tbl)
+(puthash "bds:r" "border-style:ridge;" tbl)
+(puthash "bds:s" "border-style:solid;" tbl)
+(puthash "bds:w" "border-style:wave;" tbl)
+(puthash "z:a" "z-index:auto;" tbl)
+(puthash "ct:c" "content:counter(|);" tbl)
+(puthash "cur:m" "cursor:move;" tbl)
+(puthash "ct:a" "content:attr(|);" tbl)
+(puthash "pgbb:r" "page-break-before:right;" tbl)
+(puthash "bgo:bb" "background-origin:border-box;" tbl)
+(puthash "ct:n" "content:normal;" tbl)
+(puthash "bdr+" "border-right:${1:1px} ${2:solid} ${3:#000};" tbl)
+(puthash "pgbb:l" "page-break-before:left;" tbl)
+(puthash "fza" "font-size-adjust:|;" tbl)
+(puthash "d:tbcl" "display:table-column;" tbl)
+(puthash "ovx:a" "overflow-x:auto;" tbl)
+(puthash "whs:pl" "white-space:pre-line;" tbl)
+(puthash "trsde" "transition-delay:${1:time};" tbl)
+(puthash "ovx:h" "overflow-x:hidden;" tbl)
+(puthash "ovx:v" "overflow-x:visible;" tbl)
+(puthash "ovx:s" "overflow-x:scroll;" tbl)
+(puthash "trf:scy" "transform: scaleY(${1:y});" tbl)
+(puthash "trf:scx" "transform: scaleX(${1:x});" tbl)
+(puthash "@f+" "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}" tbl)
+(puthash "trsdu" "transition-duration:${1:time};" tbl)
+(puthash "d:tbcp" "display:table-caption;" tbl)
+(puthash "bdrs" "border-radius:|;" tbl)
+(puthash "us" "user-select:${1:none};" tbl)
+(puthash "bgcp:pb" "background-clip:padding-box;" tbl)
+(puthash "bdri" "border-right-image:url(|);" tbl)
+(puthash "z" "z-index:|;" tbl)
+(puthash "d:rbbg" "display:ruby-base-group;" tbl)
+(puthash "tsh:ra" "text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});" tbl)
+(puthash "femp:a" "font-emphasize-position:after;" tbl)
+(puthash "femp:b" "font-emphasize-position:before;" tbl)
+(puthash "animtf:eo" "animation-timing-function:ease-out;" tbl)
+(puthash "whs:pw" "white-space:pre-wrap;" tbl)
+(puthash "animtf:ei" "animation-timing-function:ease-in;" tbl)
+(puthash "ap" "appearance:${1:none};" tbl)
+(puthash "animps" "animation-play-state:${1:running};" tbl)
+(puthash "lisi:n" "list-style-image:none;" tbl)
+(puthash "bdbc:t" "border-bottom-color:transparent;" tbl)
+(puthash "pos:s" "position:static;" tbl)
+(puthash "animdur" "animation-duration:${1:0}s;" tbl)
+(puthash "bdi:n" "border-image:none;" tbl)
+(puthash "pos:f" "position:fixed;" tbl)
+(puthash "pos:a" "position:absolute;" tbl)
+(puthash "fza:n" "font-size-adjust:none;" tbl)
+(puthash "v:h" "visibility:hidden;" tbl)
+(puthash "bgpy" "background-position-y:|;" tbl)
+(puthash "bgpx" "background-position-x:|;" tbl)
+(puthash "v:c" "visibility:collapse;" tbl)
+(puthash "bdbli" "border-bottom-left-image:url(|);" tbl)
+(puthash "fsm" "font-smooth:|;" tbl)
+(puthash "animfm" "animation-fill-mode:${1:both};" tbl)
+(puthash "cur:he" "cursor:help;" tbl)
+(puthash "fst" "font-stretch:|;" tbl)
+(puthash "cur:ha" "cursor:hand;" tbl)
+(puthash "bgo:pb" "background-origin:padding-box;" tbl)
+(puthash "cps" "caption-side:|;" tbl)
+(puthash "v:v" "visibility:visible;" tbl)
+tbl) tbl)
+tbl) tbl)
+tbl))
+;; src/preferences.el
+;; This file is generated from conf/preferences.json
+;; Don't edit.
+(zencoding-defparameter zencoding-preferences
+(let ((tbl (make-hash-table :test 'equal)))
+(puthash "html" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "tags" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "code" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "meter" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "tbody" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "font" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "noscript" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "style" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "img" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+(puthash "alt" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "title" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "menu" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "tt" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "tr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "param" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "name" "" tbl)
+(puthash "value" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "li" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "source" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "tfoot" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "th" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "input" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "type" "text" tbl)
+(puthash "name" "" tbl)
+(puthash "value" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "td" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dl" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "blockquote" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "fieldset" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "big" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dd" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "kbd" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "optgroup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "dt" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "wbr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "button" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "summary" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "p" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "small" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "output" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "div" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "dir" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "em" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "datalist" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "frame" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "hgroup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "meta" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "video" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "rt" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "canvas" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "rp" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "sub" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "bdo" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "dir" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "bdi" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "label" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "for" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "acronym" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "title" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "sup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "progress" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "body" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "basefont" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "base" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "href" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "br" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "address" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "article" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "strong" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "legend" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "ol" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "script" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "caption" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "s" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dialog" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "col" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h2" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h3" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h1" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h6" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h4" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "h5" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "header" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "table" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "select" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "name" "" tbl)
+(puthash "id" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "noframes" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "span" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "area" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "shape" "" tbl)
+(puthash "href" "" tbl)
+(puthash "coords" "" tbl)
+(puthash "alt" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "mark" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "dfn" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "strike" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "cite" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "thead" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "head" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "option" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "value" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "form" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "action" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "hr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "var" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "link" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "href" "" tbl)
+(puthash "rel" "stylesheet" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "ruby" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "b" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "colgroup" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "keygen" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "ul" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "applet" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "del" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "iframe" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+(puthash "frameborder" "0" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "embed" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+(puthash "type" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "pre" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "frameset" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "figure" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "ins" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "aside" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "html" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "nav" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "details" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "u" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "samp" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "map" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "name" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "track" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" t tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "object" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "type" "" tbl)
+(puthash "data" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "figcaption" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "a" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "href" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "center" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "textarea" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "rows" "10" tbl)
+(puthash "cols" "30" tbl)
+(puthash "name" "" tbl)
+(puthash "id" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "footer" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "i" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "q" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "command" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "time" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+(puthash "audio" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "src" "" tbl)
+tbl) tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "section" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "block" t tbl)
+tbl) tbl)
+(puthash "abbr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "selfClosing" nil tbl)
+(puthash "defaultAttr" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "title" "" tbl)
+tbl) tbl)
+(puthash "block" nil tbl)
+tbl) tbl)
+tbl) tbl)
+tbl) tbl)
+(puthash "css" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "vendorPrefixesProperties" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "text-fill-color" (vector
+"webkit"
+)
+ tbl)
+(puthash "ime-mode" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-layer" (vector
+"ms"
+)
+ tbl)
+(puthash "user-drag" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-image" (vector
+"webkit"
+)
+ tbl)
+(puthash "font-feature-settings" (vector
+"moz"
+"ms"
+)
+ tbl)
+(puthash "outline-radius-topleft" (vector
+"moz"
+)
+ tbl)
+(puthash "mask-box-image-slice" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-composite" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-underline-position" (vector
+"ms"
+)
+ tbl)
+(puthash "hyphenate-limit-chars" (vector
+"ms"
+)
+ tbl)
+(puthash "marquee-speed" (vector
+"o"
+)
+ tbl)
+(puthash "input-required" (vector
+"o"
+)
+ tbl)
+(puthash "color-correction" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-size" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-origin" (vector
+"webkit"
+)
+ tbl)
+(puthash "wrap-through" (vector
+"ms"
+)
+ tbl)
+(puthash "text-emphasis-position" (vector
+"webkit"
+)
+ tbl)
+(puthash "user-select" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "dashboard-region" (vector
+"webkit"
+"o"
+)
+ tbl)
+(puthash "accesskey" (vector
+"o"
+)
+ tbl)
+(puthash "scrollbar-track-color" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-columns" (vector
+"ms"
+)
+ tbl)
+(puthash "text-stroke-width" (vector
+"webkit"
+)
+ tbl)
+(puthash "link-source" (vector
+"o"
+)
+ tbl)
+(puthash "scrollbar-arrow-color" (vector
+"ms"
+)
+ tbl)
+(puthash "border-radius" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "text-stroke-color" (vector
+"webkit"
+)
+ tbl)
+(puthash "box-shadow" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "flow-into" (vector
+"ms"
+)
+ tbl)
+(puthash "scrollbar-highlight-color" (vector
+"ms"
+)
+ tbl)
+(puthash "border-left-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "word-wrap" (vector
+"ms"
+)
+ tbl)
+(puthash "text-emphasis-color" (vector
+"webkit"
+)
+ tbl)
+(puthash "hyphens" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "marquee-direction" (vector
+"webkit"
+)
+ tbl)
+(puthash "column-rule-width" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "box-lines" (vector
+"webkit"
+"ms"
+)
+ tbl)
+(puthash "column-break-inside" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-snap-points-x" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-row-align" (vector
+"ms"
+)
+ tbl)
+(puthash "force-broken-image-icon" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-fill-mode" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "box-line-progression" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-size" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-boundary-left" (vector
+"ms"
+)
+ tbl)
+(puthash "text-combine" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-column-align" (vector
+"ms"
+)
+ tbl)
+(puthash "perspective-origin" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "overflow-style" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-position" (vector
+"webkit"
+)
+ tbl)
+(puthash "content-zoom-chaining" (vector
+"ms"
+)
+ tbl)
+(puthash "column-span" (vector
+"webkit"
+)
+ tbl)
+(puthash "border-fit" (vector
+"webkit"
+)
+ tbl)
+(puthash "outline-radius-topright" (vector
+"moz"
+)
+ tbl)
+(puthash "tab-size" (vector
+"moz"
+"o"
+)
+ tbl)
+(puthash "layout-grid-type" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-clip" (vector
+"webkit"
+)
+ tbl)
+(puthash "column-gap" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "text-security" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-align-last" (vector
+"ms"
+)
+ tbl)
+(puthash "svg-shadow" (vector
+"webkit"
+)
+ tbl)
+(puthash "accelerator" (vector
+"ms"
+)
+ tbl)
+(puthash "locale" (vector
+"webkit"
+)
+ tbl)
+(puthash "line-clamp" (vector
+"webkit"
+)
+ tbl)
+(puthash "column-count" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "line-box-contain" (vector
+"webkit"
+)
+ tbl)
+(puthash "line-break" (vector
+"webkit"
+"ms"
+)
+ tbl)
+(puthash "transform-style" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "perspective" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "orient" (vector
+"moz"
+)
+ tbl)
+(puthash "float-edge" (vector
+"moz"
+)
+ tbl)
+(puthash "image-region" (vector
+"moz"
+)
+ tbl)
+(puthash "mask-box-image-width" (vector
+"webkit"
+)
+ tbl)
+(puthash "background-inline-policy" (vector
+"moz"
+)
+ tbl)
+(puthash "user-modify" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "content-zoom-snap-type" (vector
+"ms"
+)
+ tbl)
+(puthash "outline-radius-bottomright" (vector
+"moz"
+)
+ tbl)
+(puthash "wrap-margin" (vector
+"ms"
+)
+ tbl)
+(puthash "transform-origin-z" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-box-image" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-chaining" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-row" (vector
+"ms"
+)
+ tbl)
+(puthash "nbsp-mode" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-box-image-source" (vector
+"webkit"
+)
+ tbl)
+(puthash "font-language-override" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-delay" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "hyphenate-character" (vector
+"webkit"
+)
+ tbl)
+(puthash "box-flex-group" (vector
+"webkit"
+)
+ tbl)
+(puthash "border-image" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "highlight" (vector
+"webkit"
+)
+ tbl)
+(puthash "marquee-repetition" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-column" (vector
+"ms"
+)
+ tbl)
+(puthash "box-align" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "user-input" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-duration" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "transform-origin-y" (vector
+"ms"
+)
+ tbl)
+(puthash "box-ordinal-group" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "box-orient" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "stack-sizing" (vector
+"moz"
+)
+ tbl)
+(puthash "transition" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "text-size-adjust" (vector
+"moz"
+"ms"
+)
+ tbl)
+(puthash "filter" (vector
+"ms"
+)
+ tbl)
+(puthash "content-zoom-boundary" (vector
+"ms"
+)
+ tbl)
+(puthash "layout-grid-char" (vector
+"ms"
+)
+ tbl)
+(puthash "perspective-origin-x" (vector
+"ms"
+)
+ tbl)
+(puthash "perspective-origin-y" (vector
+"ms"
+)
+ tbl)
+(puthash "column-rule-color" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "high-contrast-adjust" (vector
+"ms"
+)
+ tbl)
+(puthash "text-justify" (vector
+"ms"
+)
+ tbl)
+(puthash "text-decoration-color" (vector
+"moz"
+)
+ tbl)
+(puthash "block-progression" (vector
+"ms"
+)
+ tbl)
+(puthash "border-horizontal-spacing" (vector
+"webkit"
+)
+ tbl)
+(puthash "wrap-flow" (vector
+"ms"
+)
+ tbl)
+(puthash "margin-before-collapse" (vector
+"webkit"
+)
+ tbl)
+(puthash "table-baseline" (vector
+"o"
+)
+ tbl)
+(puthash "background-clip" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "interpolation-mode" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-snap-type" (vector
+"ms"
+)
+ tbl)
+(puthash "text-emphasis-style" (vector
+"webkit"
+)
+ tbl)
+(puthash "flow-from" (vector
+"ms"
+)
+ tbl)
+(puthash "backface-visibility" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "transform" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "column-break-after" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-composite" (vector
+"webkit"
+)
+ tbl)
+(puthash "layout-grid" (vector
+"ms"
+)
+ tbl)
+(puthash "column-width" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "scrollbar-base-color" (vector
+"ms"
+)
+ tbl)
+(puthash "window-shadow" (vector
+"moz"
+)
+ tbl)
+(puthash "object-fit" (vector
+"o"
+)
+ tbl)
+(puthash "text-decorations-in-effect" (vector
+"webkit"
+)
+ tbl)
+(puthash "box-flex" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "hyphenate-limit-after" (vector
+"webkit"
+)
+ tbl)
+(puthash "animation-play-state" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "transition-delay" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "input-format" (vector
+"o"
+)
+ tbl)
+(puthash "mask-attachment" (vector
+"webkit"
+)
+ tbl)
+(puthash "scroll-boundary-right" (vector
+"ms"
+)
+ tbl)
+(puthash "animation-iteration-count" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "link" (vector
+"o"
+)
+ tbl)
+(puthash "content-zoom-boundary-max" (vector
+"ms"
+)
+ tbl)
+(puthash "text-decoration-style" (vector
+"moz"
+)
+ tbl)
+(puthash "text-autospace" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-origin" (vector
+"webkit"
+)
+ tbl)
+(puthash "user-focus" (vector
+"moz"
+)
+ tbl)
+(puthash "border-bottom-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "scroll-boundary-top" (vector
+"ms"
+)
+ tbl)
+(puthash "content-zooming" (vector
+"ms"
+)
+ tbl)
+(puthash "appearance" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "scroll-snap-x" (vector
+"ms"
+)
+ tbl)
+(puthash "marquee-loop" (vector
+"o"
+)
+ tbl)
+(puthash "column-rule-style" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "marquee-increment" (vector
+"webkit"
+)
+ tbl)
+(puthash "behavior" (vector
+"ms"
+)
+ tbl)
+(puthash "box-pack" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "animation-direction" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "scrollbar-darkshadow-color" (vector
+"ms"
+)
+ tbl)
+(puthash "animation-timing-function" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "text-blink" (vector
+"moz"
+)
+ tbl)
+(puthash "scroll-boundary-bottom" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-box-image-repeat" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-orientation" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-column-span" (vector
+"ms"
+)
+ tbl)
+(puthash "binding" (vector
+"moz"
+)
+ tbl)
+(puthash "transform-origin" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "text-decoration-line" (vector
+"moz"
+)
+ tbl)
+(puthash "animation-name" (vector
+"webkit"
+"moz"
+"o"
+)
+ tbl)
+(puthash "marquee-dir" (vector
+"o"
+)
+ tbl)
+(puthash "content-zoom-snap" (vector
+"ms"
+)
+ tbl)
+(puthash "border-top-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "border-vertical-spacing" (vector
+"webkit"
+)
+ tbl)
+(puthash "grid-rows" (vector
+"ms"
+)
+ tbl)
+(puthash "box-reflect" (vector
+"webkit"
+)
+ tbl)
+(puthash "hyphenate-limit-before" (vector
+"webkit"
+)
+ tbl)
+(puthash "mask-box-image-outset" (vector
+"webkit"
+)
+ tbl)
+(puthash "outline-radius-bottomleft" (vector
+"moz"
+)
+ tbl)
+(puthash "text-overflow" (vector
+"ms"
+)
+ tbl)
+(puthash "border-right-colors" (vector
+"moz"
+)
+ tbl)
+(puthash "layout-flow" (vector
+"ms"
+)
+ tbl)
+(puthash "box-direction" (vector
+"webkit"
+"moz"
+"ms"
+)
+ tbl)
+(puthash "animation" (vector
+"webkit"
+"o"
+)
+ tbl)
+(puthash "hyphenate-limit-lines" (vector
+"ms"
+)
+ tbl)
+(puthash "scrollbar-face-color" (vector
+"ms"
+)
+ tbl)
+(puthash "column-break-before" (vector
+"webkit"
+)
+ tbl)
+(puthash "content-zoom-snap-points" (vector
+"ms"
+)
+ tbl)
+(puthash "grid-row-span" (vector
+"ms"
+)
+ tbl)
+(puthash "touch-action" (vector
+"ms"
+)
+ tbl)
+(puthash "marquee-style" (vector
+"webkit"
+"o"
+)
+ tbl)
+(puthash "margin-after-collapse" (vector
+"webkit"
+)
+ tbl)
+(puthash "text-kashida-space" (vector
+"ms"
+)
+ tbl)
+(puthash "scrollbar-shadow-color" (vector
+"ms"
+)
+ tbl)
+(puthash "object-position" (vector
+"o"
+)
+ tbl)
+(puthash "hyphenate-limit-zone" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-snap-y" (vector
+"ms"
+)
+ tbl)
+(puthash "transform-origin-x" (vector
+"ms"
+)
+ tbl)
+(puthash "transition-property" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "word-break" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-snap-points-y" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-boundary" (vector
+"ms"
+)
+ tbl)
+(puthash "mask-repeat" (vector
+"webkit"
+)
+ tbl)
+(puthash "writing-mode" (vector
+"webkit"
+"ms"
+)
+ tbl)
+(puthash "layout-grid-mode" (vector
+"ms"
+)
+ tbl)
+(puthash "background-position-y" (vector
+"ms"
+)
+ tbl)
+(puthash "scroll-rails" (vector
+"ms"
+)
+ tbl)
+(puthash "content-zoom-boundary-min" (vector
+"ms"
+)
+ tbl)
+(puthash "background-position-x" (vector
+"ms"
+)
+ tbl)
+(puthash "box-sizing" (vector
+"webkit"
+"moz"
+)
+ tbl)
+(puthash "transition-duration" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+(puthash "rtl-ordering" (vector
+"webkit"
+)
+ tbl)
+(puthash "layout-grid-line" (vector
+"ms"
+)
+ tbl)
+(puthash "font-smoothing" (vector
+"webkit"
+)
+ tbl)
+(puthash "transition-timing-function" (vector
+"webkit"
+"moz"
+"ms"
+"o"
+)
+ tbl)
+tbl) tbl)
+(puthash "unitlessProperties" (vector
+"z-index"
+"line-height"
+"opacity"
+"font-weight"
+"zoom"
+)
+ tbl)
+(puthash "floatUnit" "em" tbl)
+(puthash "intUnit" "px" tbl)
+(puthash "color" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "case" "auto" tbl)
+(puthash "shortenIfPossible" t tbl)
+(puthash "trailingAliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "h" "hidden" tbl)
+(puthash "s" "solid" tbl)
+(puthash "t" "dotted" tbl)
+(puthash "n" "none" tbl)
+tbl) tbl)
+tbl) tbl)
+(puthash "keywordAliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "a" "auto" tbl)
+(puthash "do" "dotted" tbl)
+(puthash "i" "inherit" tbl)
+(puthash "da" "dashed" tbl)
+(puthash "s" "solid" tbl)
+(puthash "t" "transparent" tbl)
+tbl) tbl)
+(puthash "keywords" (vector
+"auto"
+"inherit"
+)
+ tbl)
+(puthash "unitAliases" (let ((tbl (make-hash-table :test 'equal)))
+(puthash "e" "em" tbl)
+(puthash "r" "rem" tbl)
+(puthash "-" "px" tbl)
+(puthash "x" "ex" tbl)
+(puthash "p" "%" tbl)
+tbl) tbl)
+tbl) tbl)
+tbl))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Zen coding parsers
+;; XML abbrev
+
+(zencoding-defparameter
+ zencoding-tag-aliases-table
+ (gethash "aliases" (gethash "html" zencoding-snippets)))
(defun zencoding-expr (input)
"Parse a zen coding expression with optional filters."
@@ -255,22 +2526,65 @@
(defun zencoding-tag (input)
"Parse a tag."
- (zencoding-run zencoding-tagname
- (let ((tagname (cadr expr))
- (has-body? (cddr expr)))
- (zencoding-pif (zencoding-run zencoding-identifier
- (zencoding-tag-classes
- `(tag (,tagname ,has-body? ,(cddr expr))) input)
- (zencoding-tag-classes
- `(tag (,tagname ,has-body? nil)) input))
- (let ((tag-data (cadar it)) (input (cdr it)))
- (zencoding-pif (zencoding-run zencoding-props
- (let ((props (cdr expr)))
- `((tag ,(append tag-data (list props))) . ,input))
- `((tag ,(append tag-data '(nil))) . ,input))
- (let ((expr (car it)) (input (cdr it)))
- (zencoding-tag-text expr input))))))
- (zencoding-default-tag input)))
+ (zencoding-run
+ zencoding-tagname
+ (let ((tagname (cadr expr))
+ (has-body? (cddr expr)))
+ (zencoding-pif
+ (zencoding-run zencoding-identifier
+ (zencoding-tag-classes
+ `(tag (,tagname ,has-body? ,(cddr expr))) input)
+ (zencoding-tag-classes
+ `(tag (,tagname ,has-body? nil)) input))
+ (let ((tag-data (cadar it)) (input (cdr it)))
+ (zencoding-pif (zencoding-run
+ zencoding-props
+ (let ((props (cdr expr)))
+ `((tag ,(append tag-data (list props))) . ,input))
+ `((tag ,(append tag-data '(nil))) . ,input))
+ (let ((expr (car it)) (input (cdr it)))
+ (destructuring-bind (expr . input)
+ (zencoding-tag-text expr input)
+ (zencoding-expand-tag-alias expr input)))))))
+ (zencoding-default-tag input)))
+
+(defun zencoding-get-first-tag (expr)
+ (if (listp expr)
+ (if (listp (car expr))
+ (zencoding-get-first-tag (car expr))
+ (if (eql (car expr) 'tag)
+ expr
+ (zencoding-get-first-tag (cdr expr))))
+ nil))
+
+(defun zencoding-expand-tag-alias (tag input)
+ (let ((tag-data (cadr tag)))
+ (let ((tag-name (car tag-data)))
+ (zencoding-aif
+ (gethash tag-name zencoding-tag-aliases-table)
+ (let ((expr (if (stringp it)
+ (zencoding-subexpr it)
+ it)))
+ (prog1
+ (let ((rt (copy-tree expr)))
+ (let ((first-tag-data (cadr (zencoding-get-first-tag rt))))
+ (setf (second first-tag-data) (second tag-data))
+ (setf (third first-tag-data) (third tag-data))
+ (setf (fourth first-tag-data)
+ (remove-duplicates
+ (append (fourth first-tag-data)
+ (fourth tag-data)) :test #'string=))
+ (setf (fifth first-tag-data)
+ (remove-duplicates
+ (append (fifth first-tag-data)
+ (fifth tag-data))
+ :test #'(lambda (p1 p2)
+ (eql (car p1) (car p2)))))
+ (setf (sixth first-tag-data) (sixth tag-data))
+ (setf (cdr rt) (concat (cdr rt) input))
+ rt))
+ (puthash tag-name expr zencoding-tag-aliases-table)))
+ `(,tag . ,input)))))
(defun zencoding-default-tag (input)
"Parse a #id or .class"
@@ -315,7 +2629,7 @@
(input (elt it 2)))
`((,(read name) ,value) . ,input)))
it
- (zencoding-parse "=\\([^\\,\\+\\>\\ )]*\\)" 2
+ (zencoding-parse "=\\([^\\,\\+\\>\\{\\}\\ )]*\\)" 2
"=property value"
(let ((value (elt it 1))
(input (elt it 2)))
@@ -331,7 +2645,7 @@
(defun zencoding-tagname (input)
"Parse a tagname a-zA-Z0-9 tagname (e.g. html/head/xsl:if/br)."
- (zencoding-parse "\\([a-zA-Z][a-zA-Z0-9:$@-]*\/?\\)" 2 "tagname, a-zA-Z0-9"
+ (zencoding-parse "\\([a-zA-Z!][a-zA-Z0-9:!$@-]*\/?\\)" 2 "tagname, a-zA-Z0-9"
(let* ((tag-spec (elt it 1))
(empty-tag (zencoding-regex "\\([^\/]*\\)\/" tag-spec 1))
(tag (zencoding-split-numbering-expressions
@@ -412,30 +2726,25 @@
"Parse an e+e expression, where e is an tag or a pexpr."
(zencoding-run zencoding-sibling
(let ((parent expr))
- (zencoding-parse "\\+" 1 "+"
- (zencoding-run zencoding-subexpr
- (let ((child expr))
- `((sibling ,parent ,child) . ,input))
- (zencoding-expand parent input))))
+ (zencoding-parse
+ "\\+" 1 "+"
+ (zencoding-run
+ zencoding-subexpr
+ (let ((child expr))
+ `((sibling ,parent ,child) . ,input))
+ (zencoding-expand parent input))))
'(error "expected first sibling")))
-(defvar zencoding-expandable-tags
- '("dl" ">(dt+dd)"
- "ol" ">li"
- "ul" ">li"
- "table" ">tr>td"))
-
(defun zencoding-expand (parent input)
"Parse an e+ expression, where e is an expandable tag"
- (let* ((parent-tag (car (elt parent 1)))
- (expandable (member parent-tag zencoding-expandable-tags)))
- (if expandable
- (let ((expansion (zencoding-child parent (concat (cadr expandable)))))
- (zencoding-pif (zencoding-parse "+\\(.*\\)" 1 "+expr"
- (zencoding-subexpr (elt it 1)))
- `((sibling ,(car expansion) ,(car it)))
- expansion))
- '(error "expected second sibling"))))
+ (let* ((parent-tag (car (cadr parent))))
+ (setf (caadr parent) (concat parent-tag "+"))
+ (destructuring-bind (parent . input)
+ (zencoding-expand-tag-alias parent input)
+ (zencoding-pif (zencoding-parse "+\\(.*\\)" 1 "+expr"
+ (zencoding-subexpr (elt it 1)))
+ `((sibling ,parent ,@it))
+ `(,parent . ,input)))))
(defun zencoding-name (input)
"Parse a class or identifier name, e.g. news, footer, mainimage"
@@ -466,62 +2775,18 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Zen coding transformer from AST to string
-(defvar zencoding-inline-tags
- '("a"
- "abbr"
- "acronym"
- "cite"
- "code"
- "dd"
- "dfn"
- "dt"
- "em"
- "h1" "h2" "h3" "h4" "h5" "h6"
- "kbd"
- "li"
- "q"
- "span"
- "strong"
- "var"
- "textarea"
- "small"
- "time" "del" "ins"
- "sub"
- "sup"
- "i" "s" "b"
- "ruby" "rt" "rp"
- "bdo"
- "iframe" "canvas"
- "audio" "video"
- "ovject" "embed"
- "map"))
-
-(defvar zencoding-block-tags
- '("p"
- "article"
- "section"
- "aside"
- "nav"
- "figure"
- "address"
- "header"
- "footer"))
-
-(defvar zencoding-self-closing-tags
- '("br"
- "img"
- "input"
- "wbr"
- "object"
- "source"
- "area"
- "param"
- "option"))
-
(defvar zencoding-leaf-function nil
"Function to execute when expanding a leaf node in the
Zencoding AST.")
+(zencoding-defparameter
+ zencoding-tag-settings-table
+ (gethash "tags" (gethash "html" zencoding-preferences)))
+
+(zencoding-defparameter
+ zencoding-tag-snippets-table
+ (gethash "snippets" (gethash "html" zencoding-snippets)))
+
(defvar zencoding-filters
'("html" (zencoding-primary-filter zencoding-make-html-tag)
"c" (zencoding-primary-filter zencoding-make-commented-html-tag)
@@ -557,43 +2822,106 @@
(classes (pop tag-info))
(props (pop tag-info))
(txt (pop tag-info))
- (self-closing? (not (or txt content
- (and has-body?
- (not (member name zencoding-self-closing-tags)))))))
- (funcall tag-maker name id classes props txt self-closing?
+ (settings (gethash name zencoding-tag-settings-table)))
+ (funcall tag-maker name has-body? id classes props txt settings
(if content content
(if zencoding-leaf-function (funcall zencoding-leaf-function))))))
-(defun zencoding-make-html-tag (tag-name tag-id tag-classes tag-props tag-txt self-closing? content)
+(defun zencoding-hash-to-list (hash &optional proc)
+ (unless proc (setq proc #'cons))
+ (loop for key being the hash-keys of hash using (hash-values val)
+ collect (funcall proc key val)))
+
+(defun zencoding-merge-tag-props (default-table tag-props)
+ (if default-table
+ (let ((tbl (copy-hash-table default-table)))
+ (loop for prop in tag-props do
+ (puthash (symbol-name (car prop)) (cadr prop) tbl))
+ (zencoding-hash-to-list tbl 'list))
+ tag-props))
+
+(defun zencoding-html-snippets-instantiate-lambda (src)
+ (let ((lines (mapcar
+ #'(lambda (src)
+ (if (string-match "^\\(.*\\)${child}\\(.*\\)$" src)
+ (mapcar (lambda (i)
+ (match-string i src))
+ '(1 2))
+ (list src)))
+ (split-string src "\n"))))
+ (labels
+ ((iter
+ (l m a b)
+ (if l
+ (if (< 1 (length (car l)))
+ (iter (cdr l)
+ 'b
+ (cons (caar l) a)
+ (cons (cadar l) b))
+ (if (eql m 'a)
+ (iter (cdr l) m (cons (caar l) a) b)
+ (iter (cdr l) m a (cons (caar l) b))))
+ (if b
+ `(lambda (contents)
+ (concat
+ ,(zencoding-join-string (reverse a) "\n")
+ contents
+ ,(zencoding-join-string (reverse b) "\n")))
+ `(lambda (contents)
+ (concat
+ ,(zencoding-join-string (reverse a) "\n")
+ contents))))))
+ (eval (iter lines 'a nil nil)))))
+
+(defun zencoding-make-html-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
"Create HTML markup string"
- (let* ((id (zencoding-concat-or-empty " id=\"" tag-id "\""))
- (classes (zencoding-mapconcat-or-empty " class=\"" tag-classes " " "\""))
- (props (zencoding-mapconcat-or-empty " " tag-props " " nil
- (lambda (prop)
- (concat (symbol-name (car prop)) "=\"" (cadr prop) "\""))))
- (content-multiline? (and content (string-match "\n" content)))
- (block-tag? (or (member tag-name zencoding-block-tags)
- (and (> (length tag-name) 1)
- (not (member tag-name zencoding-inline-tags)))))
- (lf (if (or content-multiline? block-tag?)
- "\n")))
- (concat "<" tag-name id classes props (if self-closing?
- "/>"
- (concat ">"
- (if tag-txt
- (if (or content-multiline? block-tag?)
- (zencoding-indent tag-txt)
- tag-txt))
- (if content
- (if (or content-multiline? block-tag?)
- (zencoding-indent content)
- content))
- lf
- "</" tag-name ">")))))
-
-(defun zencoding-make-commented-html-tag (tag-name tag-id tag-classes tag-props tag-txt self-closing? content)
+ (zencoding-aif
+ (gethash tag-name zencoding-tag-snippets-table)
+
+ (let ((fn (if (stringp it)
+ (zencoding-html-snippets-instantiate-lambda it)
+ it)))
+ (prog1
+ (funcall fn content)
+ (puthash tag-name fn zencoding-tag-snippets-table)))
+
+ (let* ((id (zencoding-concat-or-empty " id=\"" tag-id "\""))
+ (classes (zencoding-mapconcat-or-empty " class=\"" tag-classes " " "\""))
+ (props (let* ((tag-props-default
+ (and settings (gethash "defaultAttr" settings)))
+ (merged-tag-props
+ (zencoding-merge-tag-props
+ tag-props-default
+ tag-props)))
+ (zencoding-mapconcat-or-empty
+ " " merged-tag-props " " nil
+ (lambda (prop)
+ (let ((key (car prop)))
+ (concat (if (symbolp key) (symbol-name key) key)
+ "=\"" (cadr prop) "\""))))))
+ (content-multiline? (and content (string-match "\n" content)))
+ (block-tag? (and settings (gethash "block" settings)))
+ (self-closing? (and (not (or tag-txt content))
+ (or (not tag-has-body?)
+ (and settings (gethash "selfClosing" settings)))))
+ (lf (if (or content-multiline? block-tag?) "\n")))
+ (concat "<" tag-name id classes props
+ (if self-closing? "/>"
+ (concat ">"
+ (if tag-txt
+ (if (or content-multiline? block-tag?)
+ (zencoding-indent tag-txt)
+ tag-txt))
+ (if content
+ (if (or content-multiline? block-tag?)
+ (zencoding-indent content)
+ content))
+ lf
+ "</" tag-name ">"))))))
+
+(defun zencoding-make-commented-html-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
"Create HTML markup string with extra comments for elements with #id or .classes"
- (let ((body (zencoding-make-html-tag tag-name tag-id tag-classes tag-props tag-txt self-closing? content)))
+ (let ((body (zencoding-make-html-tag tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)))
(if (or tag-id tag-classes)
(let ((id (zencoding-concat-or-empty "#" tag-id))
(classes (zencoding-mapconcat-or-empty "." tag-classes ".")))
@@ -602,7 +2930,7 @@
"\n<!-- /" id classes " -->"))
body)))
-(defun zencoding-make-haml-tag (tag-name tag-id tag-classes tag-props tag-txt self-closing? content)
+(defun zencoding-make-haml-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
"Create HAML string"
(let ((name (if (and (equal tag-name "div")
(or tag-id tag-classes))
@@ -610,26 +2938,26 @@
(concat "%" tag-name)))
(id (zencoding-concat-or-empty "#" tag-id))
(classes (zencoding-mapconcat-or-empty "." tag-classes "."))
- (props (zencoding-mapconcat-or-empty "{" tag-props ", " "}"
- (lambda (prop)
- (concat ":" (symbol-name (car prop)) " => \"" (cadr prop) "\"")))))
+ (props (zencoding-mapconcat-or-empty
+ "{" tag-props ", " "}"
+ (lambda (prop)
+ (concat ":" (symbol-name (car prop)) " => \"" (cadr prop) "\"")))))
(concat name id classes props
(if tag-txt
(zencoding-indent tag-txt))
(if content
(zencoding-indent content)))))
-(defun zencoding-make-hiccup-tag (tag-name tag-id tag-classes tag-props tag-txt self-closing? content)
+(defun zencoding-make-hiccup-tag (tag-name tag-has-body? tag-id tag-classes tag-props tag-txt settings content)
"Create Hiccup string"
(let* ((id (zencoding-concat-or-empty "#" tag-id))
(classes (zencoding-mapconcat-or-empty "." tag-classes "."))
- (props (zencoding-mapconcat-or-empty " {" tag-props ", " "}"
- (lambda (prop)
- (concat ":" (symbol-name (car prop)) " \"" (cadr prop) "\""))))
+ (props (zencoding-mapconcat-or-empty
+ " {" tag-props ", " "}"
+ (lambda (prop)
+ (concat ":" (symbol-name (car prop)) " \"" (cadr prop) "\""))))
(content-multiline? (and content (string-match "\n" content)))
- (block-tag? (or (member tag-name zencoding-block-tags)
- (and (> (length tag-name) 1)
- (not (member tag-name zencoding-inline-tags))))))
+ (block-tag? (and settings (gethash "block" settings))))
(concat "[:" tag-name id classes props
(if tag-txt
(let ((tag-txt-quoted (concat "\"" tag-txt "\"")))
@@ -674,7 +3002,12 @@
input
(zencoding-process-filter (zencoding-default-filter) input))))))
-(defun zencoding-transform (ast-with-filters)
+(defun zencoding-html-transform (input)
+ (let ((ast (car (zencoding-expr input))))
+ (when (not (eq ast 'error))
+ (zencoding-transform-ast-with-filters ast))))
+
+(defun zencoding-transform-ast-with-filters (ast-with-filters)
"Transform AST (containing filter data) into string."
(let ((filters (cadr ast-with-filters))
(ast (caddr ast-with-filters)))
@@ -709,347 +3042,274 @@
(replace-regexp-in-string "\n" "\n " (concat "\n" text))
nil))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Test-cases
-
-(defun zencoding-test-cases ()
- (let ((tests '(;; Tags
- ("a" "<a></a>")
- ("a.x" "<a class=\"x\"></a>")
- ("a#q.x" "<a id=\"q\" class=\"x\"></a>")
- ("a#q.x.y.z" "<a id=\"q\" class=\"x y z\"></a>")
- ("#q" "<div id=\"q\">"
- "</div>")
- (".x" "<div class=\"x\">"
- "</div>")
- ("#q.x" "<div id=\"q\" class=\"x\">"
- "</div>")
- ("#q.x.y.z" "<div id=\"q\" class=\"x y z\">"
- "</div>")
- ;; Empty tags
- ("a/" "<a/>")
- ("a/.x" "<a class=\"x\"/>")
- ("a/#q.x" "<a id=\"q\" class=\"x\"/>")
- ("a/#q.x.y.z" "<a id=\"q\" class=\"x y z\"/>")
- ;; Self-closing tags
- ("input type=text" "<input type=\"text\"/>")
- ("img" "<img/>")
- ("img>metadata/*2" "<img>"
- " <metadata/>"
- " <metadata/>"
- "</img>")
- ;; Siblings
- ("a+b" "<a></a>"
- "<b></b>")
- ("a+b+c" "<a></a>"
- "<b></b>"
- "<c></c>")
- ("a.x+b" "<a class=\"x\"></a>"
- "<b></b>")
- ("a#q.x+b" "<a id=\"q\" class=\"x\"></a>"
- "<b></b>")
- ("a#q.x.y.z+b" "<a id=\"q\" class=\"x y z\"></a>"
- "<b></b>")
- ("a#q.x.y.z+b#p.l.m.n" "<a id=\"q\" class=\"x y z\"></a>"
- "<b id=\"p\" class=\"l m n\"></b>")
- ;; Tag expansion
- ("table+" "<table>"
- " <tr>"
- " <td>"
- " </td>"
- " </tr>"
- "</table>")
- ("dl+" "<dl>"
- " <dt></dt>"
- " <dd></dd>"
- "</dl>")
- ("ul+" "<ul>"
- " <li></li>"
- "</ul>")
- ("ul++ol+" "<ul>"
- " <li></li>"
- "</ul>"
- "<ol>"
- " <li></li>"
- "</ol>")
- ("ul#q.x.y m=l+" "<ul id=\"q\" class=\"x y\" m=\"l\">"
- " <li></li>"
- "</ul>")
- ;; Parent > child
- ("a>b" "<a><b></b></a>")
- ("a>b>c" "<a><b><c></c></b></a>")
- ("a.x>b" "<a class=\"x\"><b></b></a>")
- ("a#q.x>b" "<a id=\"q\" class=\"x\"><b></b></a>")
- ("a#q.x.y.z>b" "<a id=\"q\" class=\"x y z\"><b></b></a>")
- ("a#q.x.y.z>b#p.l.m.n" "<a id=\"q\" class=\"x y z\"><b id=\"p\" class=\"l m n\"></b></a>")
- ("#q>.x" "<div id=\"q\">"
- " <div class=\"x\">"
- " </div>"
- "</div>")
- ("a>b+c" "<a>"
- " <b></b>"
- " <c></c>"
- "</a>")
- ("a>b+c>d" "<a>"
- " <b></b>"
- " <c><d></d></c>"
- "</a>")
- ;; Multiplication
- ("a*1" "<a></a>")
- ("a*2" "<a></a>"
- "<a></a>")
- ("a/*2" "<a/>"
- "<a/>")
- ("a*2+b*2" "<a></a>"
- "<a></a>"
- "<b></b>"
- "<b></b>")
- ("a*2>b*2" "<a>"
- " <b></b>"
- " <b></b>"
- "</a>"
- "<a>"
- " <b></b>"
- " <b></b>"
- "</a>")
- ("a>b*2" "<a>"
- " <b></b>"
- " <b></b>"
- "</a>")
- ("a#q.x>b#q.x*2" "<a id=\"q\" class=\"x\">"
- " <b id=\"q\" class=\"x\"></b>"
- " <b id=\"q\" class=\"x\"></b>"
- "</a>")
- ("a#q.x>b/#q.x*2" "<a id=\"q\" class=\"x\">"
- " <b id=\"q\" class=\"x\"/>"
- " <b id=\"q\" class=\"x\"/>"
- "</a>")
- ;; Numbering
- ("a.$x*3" "<a class=\"1x\"></a>"
- "<a class=\"2x\"></a>"
- "<a class=\"3x\"></a>")
- ("ul>li.item$*3" "<ul>"
- " <li class=\"item1\"></li>"
- " <li class=\"item2\"></li>"
- " <li class=\"item3\"></li>"
- "</ul>")
- ("ul>li.item$$$*3" "<ul>"
- " <li class=\"item001\"></li>"
- " <li class=\"item002\"></li>"
- " <li class=\"item003\"></li>"
- "</ul>")
- ("ul>li.item$@-*2" "<ul>"
- " <li class=\"item2\"></li>"
- " <li class=\"item1\"></li>"
- "</ul>")
- ("ul>li.item$@-1000*2" "<ul>"
- " <li class=\"item1001\"></li>"
- " <li class=\"item1000\"></li>"
- "</ul>")
- ("a.$*2>b.$$@-*3" "<a class=\"1\">"
- " <b class=\"03\"></b>"
- " <b class=\"02\"></b>"
- " <b class=\"01\"></b>"
- "</a>"
- "<a class=\"2\">"
- " <b class=\"03\"></b>"
- " <b class=\"02\"></b>"
- " <b class=\"01\"></b>"
- "</a>")
- ("(div>(a#id$$*2)+b.c$@-3+c#d$)*2"
- "<div>"
- " <a id=\"id01\"></a>"
- " <a id=\"id02\"></a>"
- " <b class=\"c4\"></b>"
- " <c id=\"d1\"></c>"
- "</div>"
- "<div>"
- " <a id=\"id01\"></a>"
- " <a id=\"id02\"></a>"
- " <b class=\"c3\"></b>"
- " <c id=\"d2\"></c>"
- "</div>")
- ("a:b$$$-c$$@-:d$@-3-e$$@100/#b.c$*3"
- "<a:b001-c03:d5-e100 id=\"b\" class=\"c1\"/>"
- "<a:b002-c02:d4-e101 id=\"b\" class=\"c2\"/>"
- "<a:b003-c01:d3-e102 id=\"b\" class=\"c3\"/>")
- ("ul>li.item${name: item$ price: $\\$}*3"
- "<ul>"
- " <li class=\"item1\">name: item1 price: 1$</li>"
- " <li class=\"item2\">name: item2 price: 2$</li>"
- " <li class=\"item3\">name: item3 price: 3$</li>"
- "</ul>")
- ;; Properties
- ("a x" "<a x=\"\"></a>")
- ("a x=" "<a x=\"\"></a>")
- ("a x=\"\"" "<a x=\"\"></a>")
- ("a x=y" "<a x=\"y\"></a>")
- ("a x=\"y\"" "<a x=\"y\"></a>")
- ("a x=\"()\"" "<a x=\"()\"></a>")
- ("a x m" "<a x=\"\" m=\"\"></a>")
- ("a x= m=\"\"" "<a x=\"\" m=\"\"></a>")
- ("a x=y m=l" "<a x=\"y\" m=\"l\"></a>")
- ("a/ x=y m=l" "<a x=\"y\" m=\"l\"/>")
- ("a#foo x=y m=l" "<a id=\"foo\" x=\"y\" m=\"l\"></a>")
- ("a.foo x=y m=l" "<a class=\"foo\" x=\"y\" m=\"l\"></a>")
- ("a#foo.bar.mu x=y m=l" "<a id=\"foo\" class=\"bar mu\" x=\"y\" m=\"l\"></a>")
- ("a/#foo.bar.mu x=y m=l" "<a id=\"foo\" class=\"bar mu\" x=\"y\" m=\"l\"/>")
- ("a x=y+b" "<a x=\"y\"></a>"
- "<b></b>")
- ("a x=y+b x=y" "<a x=\"y\"></a>"
- "<b x=\"y\"></b>")
- ("a x=y>b" "<a x=\"y\"><b></b></a>")
- ("a x=y>b x=y" "<a x=\"y\"><b x=\"y\"></b></a>")
- ("a x=y>b x=y+c x=y" "<a x=\"y\">"
- " <b x=\"y\"></b>"
- " <c x=\"y\"></c>"
- "</a>")
- ;; Parentheses
- ("(a)" "<a></a>")
- ("(a)+(b)" "<a></a>"
- "<b></b>")
- ("a>(b)" "<a><b></b></a>")
- ("(a>b)>c" "<a><b></b></a>")
- ("(a>b)+c" "<a><b></b></a>"
- "<c></c>")
- ("z+(a>b)+c+k" "<z></z>"
- "<a><b></b></a>"
- "<c></c>"
- "<k></k>")
- ("(a)*2" "<a></a>"
- "<a></a>")
- ("((a)*2)" "<a></a>"
- "<a></a>")
- ("((a))*2" "<a></a>"
- "<a></a>")
- ("(a>b)*2" "<a><b></b></a>"
- "<a><b></b></a>")
- ("(a+b)*2" "<a></a>"
- "<b></b>"
- "<a></a>"
- "<b></b>")
- ;; Text
- ("a{Click me}" "<a>Click me</a>")
- ("a>{Click me}*3" "<a>"
- " Click me"
- " Click me"
- " Click me"
- "</a>")
- ("a{click}+b{here}" "<a>click</a>"
- "<b>here</b>")
- ("a>{click}+b{here}" "<a>"
- " click"
- " <b>here</b>"
- "</a>")
- ("p>{Click }+a{here}+{ to continue}"
- "<p>"
- " Click "
- " <a>here</a>"
- " to continue"
- "</p>")
- ("p{Click }+a{here}+{ to continue}"
- "<p>"
- " Click "
- "</p>"
- "<a>here</a>"
- " to continue")
- ;; Climb-up
- ("a>b>c^d" "<a>"
- " <b><c></c></b>"
- " <d></d>"
- "</a>")
- ("a>b>c^^d" "<a><b><c></c></b></a>"
- "<d></d>")
- ("a*2>b*2>c^d" "<a>"
- " <b><c></c></b>"
- " <b><c></c></b>"
- " <d></d>"
- "</a>"
- "<a>"
- " <b><c></c></b>"
- " <b><c></c></b>"
- " <d></d>"
- "</a>")
- ("div+a>p>span{foo}+em>b^^^p"
- "<div>"
- "</div>"
- "<a>"
- " <p>"
- " <span>foo</span>"
- " <em><b></b></em>"
- " </p>"
- "</a>"
- "<p>"
- "</p>")
- ("div+div>p>span+em^blockquote{foo}"
- "<div>"
- "</div>"
- "<div>"
- " <p>"
- " <span></span>"
- " <em></em>"
- " </p>"
- " <blockquote>"
- " foo"
- " </blockquote>"
- "</div>")
- ;; Filter: comment
- ("a.b|c" "<!-- .b -->"
- "<a class=\"b\"></a>"
- "<!-- /.b -->")
- ("#a>.b|c" "<!-- #a -->"
- "<div id=\"a\">"
- " <!-- .b -->"
- " <div class=\"b\">"
- " </div>"
- " <!-- /.b -->"
- "</div>"
- "<!-- /#a -->")
- ;; Filter: HAML
- ("a|haml" "%a")
- ("a#q.x.y.z|haml" "%a#q.x.y.z")
- ("a#q.x x=y m=l|haml" "%a#q.x{:x => \"y\", :m => \"l\"}")
- ("div|haml" "%div")
- ("div.footer|haml" ".footer")
- (".footer|haml" ".footer")
- ("p>{This is haml}*2+a href=#+br|haml"
- "%p"
- " This is haml"
- " This is haml"
- " %a{:href => \"#\"}"
- " %br")
-
- ;; Filter: Hiccup
- ("a|hic" "[:a]")
- ("a#q.x.y.z|hic" "[:a#q.x.y.z]")
- ("a#q.x x=y m=l|hic" "[:a#q.x {:x \"y\", :m \"l\"}]")
- (".footer|hic" "[:div.footer]")
- ("p>a href=#+br|hic" "[:p"
- " [:a {:href \"#\"}]"
- " [:br]]")
- ("#q>(a*2>b{x})+p>{m}+b|hic"
- "[:div#q"
- " [:a [:b \"x\"]]"
- " [:a [:b \"x\"]]"
- " [:p"
- " \"m\""
- " [:b]]]")
- ;; Filter: escape
- ("script src=&quot;|e" "&lt;script src=\"&amp;quot;\"&gt;"
- "&lt;/script&gt;")
- )))
- (mapc (lambda (input)
- (let ((expected (mapconcat 'identity (cdr input) "\n"))
- (actual (zencoding-transform (car (zencoding-expr (car input))))))
- (if (not (equal expected actual))
- (error (concat "Assertion " (car input) " failed:"
- expected
- " == "
- actual)))))
- tests)
- (concat (number-to-string (length tests)) " tests performed. All OK.")))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; CSS abbrev:
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(zencoding-defparameter
+ zencoding-css-unit-aliases
+ (gethash "unitAliases" (gethash "css" zencoding-preferences)))
+(defun zencoding-css-arg-number (input)
+ (zencoding-parse
+ " *\\(\\(?:-\\|\\)[0-9.]+\\)\\(-\\|[A-Za-z]*\\)" 3 "css number arguments"
+ (cons (list (elt it 1)
+ (let ((unit (elt it 2)))
+ (if (= (length unit) 0)
+ (if (find ?. (elt it 1)) "em" "px")
+ (gethash unit zencoding-css-unit-aliases unit))))
+ input)))
+
+(zencoding-defparameter
+ zencoding-css-color-shorten-if-possible
+ (gethash "shortenIfPossible" (gethash "color" (gethash "css" zencoding-preferences))))
+(zencoding-defparameter
+ zencoding-css-color-case
+ (gethash "case" (gethash "color" (gethash "css" zencoding-preferences))))
+(zencoding-defparameter
+ zencoding-css-color-trailing-aliases
+ (gethash "trailingAliases" (gethash "color" (gethash "css" zencoding-preferences))))
+(defun zencoding-css-arg-color (input)
+ (zencoding-parse
+ (concat " *#\\([0-9a-fA-F]\\{1,6\\}\\)\\(rgb\\|\\)\\(["
+ (zencoding-join-string
+ (zencoding-get-keys-of-hash zencoding-css-color-trailing-aliases) "")
+ "]\\|\\)")
+ 4 "css color argument"
+ (let ((color
+ (let* ((n (elt it 1))
+ (l (length n)))
+ (substring
+ (cond ((= l 1) (concat (make-list 6 (string-to-char n))))
+ ((= l 2) (concat n n n))
+ ((= l 3) (concat
+ (loop for c in (string-to-list n)
+ append (list c c))))
+ (t (concat n n)))
+ 0 6))))
+ (cons
+ (let ((rgb-mode (string= (elt it 2) "rgb")))
+ (if rgb-mode
+ (format "rgb(%d,%d,%d)"
+ (string-to-int (substring color 0 2) 16)
+ (string-to-int (substring color 2 4) 16)
+ (string-to-int (substring color 4 6) 16))
+ (concat
+ "#"
+ (let ((filter (cond ((string= zencoding-css-color-case "auto") #'identity)
+ ((string= zencoding-css-color-case "up") #'upcase)
+ (t #'downcase))))
+ (funcall
+ filter
+ (if (and zencoding-css-color-shorten-if-possible
+ (eql (aref color 0) (aref color 1))
+ (eql (aref color 2) (aref color 3))
+ (eql (aref color 4) (aref color 5)))
+ (concat (mapcar #'(lambda (i) (aref color i)) '(0 2 4)))
+ color))))))
+ (if (< 0 (length (elt it 3)))
+ (cons (gethash (elt it 3) zencoding-css-color-trailing-aliases) input)
+ input)))))
+
+(defun zencoding-css-arg-something (input)
+ (zencoding-parse
+ " *\\([^ ]+\\)" 2 "css argument"
+ (cons (elt it 1) input)))
+
+(defun zencoding-css-parse-arg (input)
+ (zencoding-run zencoding-css-arg-number it
+ (zencoding-run zencoding-css-arg-color it
+ (zencoding-run zencoding-css-arg-something it
+ (if (equal input "")
+ it
+ (cons input ""))))))
+
+(defun zencoding-css-important-p (input)
+ (let ((len (length input)))
+ (and (< 0 len)
+ (char-equal (aref input (1- len)) ?!))))
+
+(defun zencoding-css-parse-args (args)
+ (when args
+ (let ((rt nil))
+ (loop
+ (zencoding-pif
+ (zencoding-css-parse-arg args)
+ (loop for i on it do (push (car i) rt)
+ while (consp (cdr i))
+ finally (setq args (cdr i)))
+ (return (nreverse rt)))))))
+
+(defun zencoding-css-split-args (exp)
+ (zencoding-aif
+ (string-match "\\(?:[ #0-9$]\\|-[0-9]\\)" exp)
+ (list (substring exp 0 it) (substring exp it))
+ (list exp nil)))
+
+(defun zencoding-css-split-vendor-prefixes (input)
+ (zencoding-parse
+ "\\(-[wmso]+-\\|-\\|\\)\\(.*\\)" 3 "css vendor prefixes"
+ (list (elt it 2)
+ (let ((vp (elt it 1)))
+ (if (not (string= vp ""))
+ (if (string= vp "-") 'auto
+ (string-to-list (subseq vp 1 -1))))))))
+
+(defun zencoding-css-subexpr (exp)
+ (let* ((importantp (zencoding-css-important-p exp)))
+ (destructuring-bind (exp vp)
+ (zencoding-css-split-vendor-prefixes exp)
+ (destructuring-bind (key args)
+ (zencoding-css-split-args (if importantp (subseq exp 0 -1) exp))
+ `(,key ,vp
+ ,importantp
+ ,@(zencoding-css-parse-args args))))))
+
+(defun zencoding-css-toknize (str)
+ (let* ((i (split-string str "+"))
+ (rt nil))
+ (loop
+ (let ((f (first i))
+ (s (second i)))
+ (if f
+ (if (and s (or (string= s "")
+ (string-match "^\\(?:[ #0-9$]\\|-[0-9]\\)" s)))
+ (progn
+ (setf rt (cons (concat f "+" s) rt))
+ (setf i (cddr i)))
+ (progn
+ (setf rt (cons f rt))
+ (setf i (cdr i))))
+ (return (nreverse rt)))))))
+
+(defun zencoding-css-expr (input)
+ (mapcar #'zencoding-css-subexpr
+ (zencoding-css-toknize input)))
+
+(zencoding-defparameter
+ zencoding-css-snippets
+ (gethash "snippets" (gethash "css" zencoding-snippets)))
+
+(zencoding-defparameter
+ zencoding-css-unitless-properties
+ (gethash "unitlessProperties" (gethash "css" zencoding-preferences)))
+
+(zencoding-defparameter
+ zencoding-css-unitless-properties-regex
+ (concat "^\\(:?" (zencoding-join-string
+ zencoding-css-unitless-properties "\\|")
+ "\\):.*$"))
+
+(defun zencoding-css-instantiate-lambda (str)
+ (flet ((insert-space-between-name-and-body
+ (str)
+ (if (string-match "^\\([a-z-]+:\\)\\(.+\\)$" str)
+ (zencoding-join-string
+ (mapcar (lambda (ref) (match-string ref str)) '(1 2)) " ")
+ str))
+ (split-string-to-body
+ (str args-sym)
+ (let ((rt '(concat)) (idx-max 0))
+ (loop for i from 0 to 255 do
+ (zencoding-aif
+ (string-match "\\(?:|\\|${\\(?:\\([0-9]\\)\\|\\)\\(?::\\(.+?\\)\\|\\)}\\)" str)
+ (destructuring-bind (mat idx def)
+ (mapcar (lambda (ref) (match-string ref str)) '(0 1 2))
+ (setf rt
+ `((or
+ (nth ,(let ((cur-idx (if idx (1- (string-to-int idx)) i)))
+ (setf idx-max (max cur-idx idx-max)))
+ ,args-sym)
+ ,(or def ""))
+ ,(substring str 0 it) ;; ordered to reverse
+ ,@rt))
+ (setf str (substring str (+ it (length mat)))))
+ ;; don't use nreverse. cause bug in emacs-lisp.
+ (return (cons idx-max (reverse (cons str rt)))))))))
+ (let ((args (gensym))
+ (str (insert-space-between-name-and-body str)))
+ (destructuring-bind (idx-max . body) (split-string-to-body str args)
+ (eval
+ `(lambda (&rest ,args)
+ (progn
+ (when (nthcdr ,idx-max ,args)
+ (setf (nthcdr ,idx-max ,args)
+ (list (zencoding-join-string
+ (nthcdr ,idx-max ,args) " "))))
+ ,body)))))))
+
+(zencoding-defparameter
+ zencoding-vendor-prefixes-properties
+ (gethash "vendorPrefixesProperties" (gethash "css" zencoding-preferences)))
+(zencoding-defparameter
+ zencoding-vendor-prefixes-default
+ (list "webkit" "moz" "ms" "o"))
+(defun zencoding-css-transform-vendor-prefixes (line vp)
+ (let ((key (subseq line 0 (or (position ?: line) (length line)))))
+ (let ((vps (if (eql vp 'auto)
+ (gethash key
+ zencoding-vendor-prefixes-properties
+ zencoding-vendor-prefixes-default)
+ (mapcar (lambda (v)
+ (cond ((= v ?w) "webkit")
+ ((= v ?m) "moz")
+ ((= v ?s) "ms")
+ ((= v ?o) "o")))
+ vp))))
+ (zencoding-join-string
+ (append (mapcar (lambda (v) (concat "-" v "-" line)) vps)
+ (list line))
+ "\n"))))
+
+(defun zencoding-css-transform-exprs (exprs)
+ (zencoding-join-string
+ (mapcar
+ #'(lambda (expr)
+ (let ((basement
+ (zencoding-aif
+ (gethash (car expr) zencoding-css-snippets)
+ (let ((set it) (fn nil) (unitlessp nil))
+ (if (stringp set)
+ (progn
+ ;; new pattern
+ ;; creating print function
+ (setf fn (zencoding-css-instantiate-lambda set))
+ ;; get unitless or no
+ (setf unitlessp
+ (not (null (string-match
+ zencoding-css-unitless-properties-regex set))))
+ ;; caching
+ (puthash (car expr) (cons fn unitlessp) zencoding-css-snippets))
+ (progn
+ ;; cache hit.
+ (setf fn (car set))
+ (setf unitlessp (cdr set))))
+ (apply fn
+ (mapcar
+ #'(lambda (arg)
+ (if (listp arg)
+ (if unitlessp (car arg)
+ (apply #'concat arg))
+ arg))
+ (cdddr expr))))
+ (concat (car expr) ": "
+ (zencoding-join-string
+ (mapcar #'(lambda (arg)
+ (if (listp arg) (apply #'concat arg) arg))
+ (cdddr expr)) " ")
+ ";"))))
+ (let ((line
+ (if (caddr expr)
+ (concat (subseq basement 0 -1) " !important;")
+ basement)))
+ (zencoding-aif
+ (cadr expr)
+ (zencoding-css-transform-vendor-prefixes line it)
+ line))))
+ exprs)
+ "\n"))
+
+(defun zencoding-css-transform (input)
+ (zencoding-css-transform-exprs (zencoding-css-expr input)));;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Zencoding minor mode
(defgroup zencoding nil
@@ -1078,6 +3338,11 @@
(replace-regexp-in-string "\n" (concat "\n" first-col)
(replace-regexp-in-string " " tab markup)))))
+(defun zencoding-transform (input)
+ (if (eql major-mode 'css-mode)
+ (zencoding-css-transform input)
+ (zencoding-html-transform input)))
+
;;;###autoload
(defun zencoding-expand-line (arg)
"Replace the current line's zencode expression with the corresponding expansion.
@@ -1108,11 +3373,12 @@ For more information see `zencoding-mode'."
(zencoding-preview beg end))
(let ((expr (zencoding-expr-on-line)))
(if expr
- (let* ((markup (zencoding-transform (car (zencoding-expr (first expr)))))
- (pretty (zencoding-prettify markup (current-indentation))))
- (save-excursion
- (delete-region (second expr) (third expr))
- (zencoding-insert-and-flash pretty))))))))
+ (let ((markup (zencoding-transform (first expr))))
+ (when markup
+ (let ((pretty (zencoding-prettify markup (current-indentation))))
+ (save-excursion
+ (delete-region (second expr) (third expr))
+ (zencoding-insert-and-flash pretty))))))))))
(defvar zencoding-mode-keymap nil
"Keymap for zencode minor mode.")
@@ -1151,19 +3417,19 @@ See also `zencoding-expand-line'."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Zencoding yasnippet integration
-(defun zencoding-transform-yas (ast)
+(defun zencoding-transform-yas (input)
(let* ((leaf-count 0)
(zencoding-leaf-function
(lambda ()
(format "$%d" (incf leaf-count)))))
- (zencoding-transform ast)))
+ (zencoding-transform input)))
;;;###autoload
(defun zencoding-expand-yas ()
(interactive)
(let ((expr (zencoding-expr-on-line)))
(if expr
- (let* ((markup (zencoding-transform-yas (car (zencoding-expr (first expr)))))
+ (let* ((markup (zencoding-transform-yas (first expr)))
(filled (replace-regexp-in-string "><" ">\n<" markup)))
(delete-region (second expr) (third expr))
(insert filled)
@@ -1323,12 +3589,10 @@ accept it or skip it."
(defun zencoding-preview-transformed (indent)
(let* ((string (buffer-substring-no-properties
(overlay-start zencoding-preview-input)
- (overlay-end zencoding-preview-input)))
- (ast (car (zencoding-expr string))))
- (when (not (eq ast 'error))
- (let ((output (zencoding-transform ast)))
- (when output
- (zencoding-prettify output indent))))))
+ (overlay-end zencoding-preview-input))))
+ (let ((output (zencoding-transform string)))
+ (when output
+ (zencoding-prettify output indent)))))
(defun zencoding-update-preview (indent)
(let* ((pretty (zencoding-preview-transformed indent))
diff --git a/zencoding-trie.nw b/zencoding-trie.nw
deleted file mode 100644
index bc9c659..0000000
--- a/zencoding-trie.nw
+++ /dev/null
@@ -1,170 +0,0 @@
-% -*- mode: noweb; noweb-doc-mode: latex-mode; noweb-code-mode: emacs-lisp-mode; -*-
-
-To improve the performance of zencoding-mode, caching/memoization of
-previously entered input needed to be done. At first, a naive
-hash-table implementation was chosen and this greatly cut down the
-speed with which zencoding generated HTML. Then it was realized that a
-trie data structure would be more efficient as the hash-table was
-storing partially entered input as well. A trie could store the
-partially entered data when needed and use less space than a
-hash-table.
-
-A trie is a tree where each node represents a character in a string.
-When you reach a leaf node, a word or sentence is spelled out. Each
-node can contain a value.
-
-\emph{Important: the key is not stored in the node, but in the parent
- of that node.}
-
-The only operations we require for our trie are \emph{retrieve value}
-and \emph{insert value}.
-
-A node is a sequence of two elements. The first element is some value,
-in our case the cached version of zencoding's AST (Abstract Syntax
-Tree) output. If this is \texttt{NIL} then there is no value stored in
-this node. The second element is a sequence of branches (more nodes).
-
-<<Node creation function>>=
-(defun make-zencoding-trie-node ()
- "Creates a vector of two elements. The first element is some value,
-the second element is a character table for storing more branches of the
-trie. The value is initially NIL."
- (vector nil (make-char-table 'trie-table)))
-@
-
-We need some functions for setting and getting the values of our node
-type. All of the functions accept a node as an argument which must be
-a sequence type with at least two elements. The $value$ argument can
-be anything, typically something non-\texttt{NIL}. The $branch-key$
-argument must be a character.
-
-<<Node accessors>>=
-(defun zencoding-trie-node-value (node)
- (aref node 0))
-
-(defun zencoding-trie-node-set-value (node value)
- (aset node 0 value))
-
-(defun zencoding-trie-node-branches (node)
- (aref node 1))
-
-(defun zencoding-trie-node-branch (node branch-key)
- (aref (zencoding-trie-node-branches node) branch-key))
-@
-
-We need a function to access a particular branch in a node. If the
-branch does not exist, it will be created.
-
-<<Node accessors>>=
-(defun zencoding-trie-node-create-branch (node branch-key)
- (aset (zencoding-trie-node-branches node)
- branch-key
- (make-zencoding-trie-node)))
-
-(defun zencoding-trie-node-brancher (node branch-key)
- (let ((branch (aref (zencoding-trie-node-branches node) branch-key)))
- (if branch
- branch
- ;; branch doesn't exist, so create it and then return it.
- (zencoding-trie-node-create-branch node branch-key))))
-@
-
-The retrieval function is given a string $s$ to search for and the
-$trie$ to search within. Where $n$ is the length of the string $s$,
-the argument $i$ is bounded like so: $0 < i \leq n$.
-
-We are moving forward through a string till we reach its end. The
-current character is $s_{i - 1}$. If the current node we are visting
-in the trie contains the current character as one of its branches,
-then we have to visit it.
-
-When the end of $s$ has been reached, $i = n$, then we have reached
-the correct node and can return it (it will be created if it doesn't
-already exist). Before this, we will have to keep on searching for the
-right node.
-
-If we reach the end of the trie before the correct node has been
-found, we return \texttt{NIL}.
-
-The traverse function is a generalized version which includes a
-function argument, $f$, telling us how to select the next branch to
-visit.
-
-<<Retrieve node operation>>=
-(defun zencoding-trie-traverse (s trie i f)
- (if (null trie)
- nil
- (let ((branch (funcall f trie (aref s (1- i)))))
- (if (or (null branch) (= i (length s)))
- branch
- (zencoding-trie-traverse s branch (1+ i) f)))))
-
-(defun zencoding-trie-retrieve (s trie)
- (zencoding-trie-traverse s trie 1 'zencoding-trie-node-branch))
-@
-
-Next we have a function for inserting a string and its value into a
-trie. The pre-conditions are that $s$ is a type of string, $value$ and
-$trie$ are non-\texttt{NIL}.
-
-We use the previously defined retrieve operation to find the final
-node and then insert the $value$ there. Fortunately for us, the
-retrieve operation takes care of creating new branches if necessary.
-
-<<Insert node operation>>=
-(defun zencoding-trie-insert (s value trie)
- "`s' is the string used to navigate the trie (each character is a node
-in the trie). `value' is the value we want to insert. `trie' is the node
-where we start the insertion."
- (zencoding-trie-node-set-value
- (zencoding-trie-traverse s trie 1 'zencoding-trie-node-brancher)
- value))
-@
-
-The code is licensed under the GNU GPL version 3 or later.
-
-<<Copyright info>>=
-;;; zencoding-trie.el --- A trie data structure built for zencoding-mode
-;;
-;; Copyright (C) 2009, Rudolf Olah
-;;
-;; Author: Rudolf Olah <omouse@gmail.com>
-;;
-;; This file is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This file 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 General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-;;
-@
-
-The final file looks like this:
-
-<<zencoding-trie.el>>=
-<<Copyright info>>
-
-<<Node creation function>>
-
-<<Node accessors>>
-
-<<Retrieve node operation>>
-
-<<Insert node operation>>
-
-(provide 'zencoding-trie)
-
-;; test code
-(let ((x (make-zencoding-trie-node)))
- (zencoding-trie-insert "ha" 1 x)
- (zencoding-trie-insert "hi" 2 x)
- (zencoding-trie-retrieve "ha" x))
-@