adding in a note about how to change the default behaviour of indentation in Rails. we had the question and answer, but no answer on how to change it. ;)
This commit is contained in:
parent
cea0fe57d0
commit
142d6b0b92
10
FAQ.md
10
FAQ.md
|
@ -5,7 +5,15 @@
|
|||
### Why is my markup indented properly in development mode, but not in production? {#q-indentation-in-production}
|
||||
|
||||
To improve performance, Haml defaults to {Haml::Options#ugly "ugly" mode} in
|
||||
Rails apps running in production.
|
||||
Rails apps running in production. Ugly mode is when whitespace is stripped out,
|
||||
and this *can* cause issues occassionally.
|
||||
|
||||
If you are using Rails, you can change the default behaviour by creating a config/initializers/haml.rb file and
|
||||
adding in the following line.
|
||||
|
||||
Haml::Template.options[:ugly] = true
|
||||
|
||||
Or, you can pass in false, if you want your production mode to run all pretty like.
|
||||
|
||||
### How do I put a punctuation mark after an element, like "`I like <strong>cake</strong>!`"? {#q-punctuation}
|
||||
|
||||
|
|
Loading…
Reference in New Issue