truncate_html icon indicating copy to clipboard operation
truncate_html copied to clipboard

New lines should be interpreted.

Open dchapman1988 opened this issue 11 years ago • 4 comments

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

dchapman1988 avatar Jul 24 '13 13:07 dchapman1988

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.

hgmnz avatar Jul 24 '13 16:07 hgmnz

I can't wait for a truncate_html allowing line breaks. It's currently unusable with long

 code.

gcrieloue-main avatar Aug 11 '13 23:08 gcrieloue-main

Did you end up fixing this for yourself? Getting the same problem for my new blog engine...

jipiboily avatar Oct 08 '14 01:10 jipiboily

@jipiboily nope, as far as I know, nobody has come up with a patch yet.

hgmnz avatar Oct 08 '14 17:10 hgmnz