diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2021-03-18 00:23:57 -0700 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2021-03-18 00:23:57 -0700 |
commit | 3c10d209d706c286817e7150595113d9cda444bd (patch) | |
tree | 83f24325544855c64306c01f54cce31731b59f4a /static/hl/languages/haml.min.js | |
parent | f8ae4d47bd7f3c0534822a78be8f0654195c4e1a (diff) |
Add highligh.js
Diffstat (limited to 'static/hl/languages/haml.min.js')
-rw-r--r-- | static/hl/languages/haml.min.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/static/hl/languages/haml.min.js b/static/hl/languages/haml.min.js new file mode 100644 index 0000000..2c6d4e2 --- /dev/null +++ b/static/hl/languages/haml.min.js @@ -0,0 +1,15 @@ +hljs.registerLanguage("haml",(()=>{"use strict";return e=>({name:"HAML", +case_insensitive:!0,contains:[{className:"meta", +begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$", +relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{ +begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{ +className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+" +},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class", +begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>", +end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr", +begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0 +}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=", +end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr", +begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+", +relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,starts:{end:/\}/, +subLanguage:"ruby"}}]})})());
\ No newline at end of file |