From 3c10d209d706c286817e7150595113d9cda444bd Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Thu, 18 Mar 2021 00:23:57 -0700 Subject: Add highligh.js --- static/hl/languages/haml.min.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 static/hl/languages/haml.min.js (limited to 'static/hl/languages/haml.min.js') 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 -- cgit v1.2.3-70-g09d2