Skip to content

Commit

Permalink
Add basic Haml support (XAMPPRocky#869)
Browse files Browse the repository at this point in the history
Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
  • Loading branch information
2 people authored and kornysietsma committed Nov 16, 2022
1 parent 2e41309 commit a8fb5ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions languages.json
Expand Up @@ -552,6 +552,11 @@
"quotes": [["\\\"", "\\\""]],
"extensions": ["gw"]
},
"Haml": {
"line_comment": ["-#"],
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"extensions": ["haml"]
},
"Hamlet": {
"multi_line_comments": [["<!--", "-->"]],
"quotes": [["\\\"", "\\\""], ["'", "'"]],
Expand Down
18 changes: 18 additions & 0 deletions tests/data/haml.haml
@@ -0,0 +1,18 @@
-# 18 lines 11 code 2 comments 5 blanks
%section.container

- @posts.each do |post|
-# Ruby comment
%h1= post.title

%h2= post.subtitle

.content
= post.content

/
HTML comment. Not detected as of now.
%div
%span
This is all wrapped in a comment

0 comments on commit a8fb5ca

Please sign in to comment.