Skip to content
Snippets Groups Projects
Commit 3873031c authored by Arnaud Levy's avatar Arnaud Levy
Browse files

strip

parent 605b5ad1
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ module Admin::ApplicationHelper
indentation = ' ' # Beware, it works only at level one, with 2 spaces
strip_tags(text)
.dup
.strip
.gsub("\r\n", "\n") # Remove useless \r
.gsub("\n", "\n#{indentation}") # Indent properly to avoid broken frontmatter
.chomp # Remove extra newlines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment