truncate_html
truncate_html copied to clipboard
New lines should be interpreted.
I know there was this issue: https://github.com/hgmnz/truncate_html/issues/43
But should it not just interpret the new line?
Take my website for example: http://www.dchapman.io/ (here the code examples look wonky because the new line chars are getting replaced with spaces).
Here's what the post should look like: http://www.dchapman.io/posts/changing-column-type-in-postgresql-rails
Here's what the index looks like where truncate_html
is being used: https://github.com/dchapman1988/dchapman.io/blob/master/app/views/posts/index.html.slim#L10
Hi,
If you propose a pull request which implements the newline behavior you desire behind an option, where the default remains what it is today, that'd be a reasonable way forward.
I can't wait for a truncate_html allowing line breaks. It's currently unusable with long
code.
Did you end up fixing this for yourself? Getting the same problem for my new blog engine...
@jipiboily nope, as far as I know, nobody has come up with a patch yet.