How to remove unwanted indent from HAML's pre tag

前端 未结 2 1860
别跟我提以往
别跟我提以往 2020-12-28 13:04

I have problem with

, here is my code, and the screenshot is attached below. How to remove the indents? 

%pre.code
    :escaped
              


        
2条回答
  •  醉话见心
    2020-12-28 13:57

    You need to use the #preserve helper to convert the newlines in the pre to newline entities, like so:

    %pre.code
        = preserve do
            :escaped
                
                
                    
                    
                        

    In the future, you'll be able to nest filters, so you can do :preserve:escaped.

提交回复
热议问题