3 ms·
That's great; Haml is one thing I like most when doing web development on Ruby/Rails. The only thing I don't like about this implementation is the blocks with i
by ceritium 3y ago
That's great; Haml is one thing I like most when doing web development on Ruby/Rails. The only thing I don't like about this implementation is the blocks with inline code:
- if user != nil {
%strong The user exists
- }
- leipert 3y agoCouldn’t you do without the angular brackets? - if user != nil %strong The user exists (That being said, the indentation bit also tripped me up in the past)
- quechimba 3y agoI use Haml in my web framework, I use syntax_suggest [1] to count the missing pairs so I can insert them automatically at the end of the block. It would probably not be too difficult to do the same thing in Go. 1. https://github.com/ruby/syntax_suggest/blob/main/lib/syntax_suggest/left_right_lex_count.rb https://github.com/ruby/syntax_suggest/blob/main/lib/syntax_...
- stackus 3y agoThank you for posting this link. I'll check this out and see if I can get the braces dropped.
- stackus 3y agoThis is something I would like to have working, the subtraction of the braces that is. I did have a naive solution where it would insert the braces for you if the left the opening brace off and it would assume you wanted the closing brace too. This caused problems when I would put in a continuation of an if statement like: - else if other_condition %span other content - else %span another bit of content I pulled the broken solution completely and do plan to revisit dropping the brace requirement because not having the braces aligns with the idea/reason why you'd use Haml in the first place.