Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic Haml support #869

Merged
merged 2 commits into from Aug 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions languages.json
Expand Up @@ -541,6 +541,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