mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 19:41:06 +00:00
6f7bf3f2d7
This commit adds a new `.InnerDeindent` method to the shortcode context, which is `.Inner` with any indendation removed. This is then used in the built-in `highlight` shortcode to prevent the extra whitespace getting hightlighted. Fixes #4717
1 line
No EOL
164 B
HTML
1 line
No EOL
164 B
HTML
{{ if len .Params | eq 2 }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) "" }}{{ end }} |