FIXED: Use standard spaces for indentation in "Copy as HTML"

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
User avatar
pjj
Posts: 2130
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

FIXED: Use standard spaces for indentation in "Copy as HTML"

Post by pjj »

I just read an interesting article Is highlight.js Harmful for Your Site? and, convinced by author's arguments, I immediately embarked to find out if RJ TE can export code clips with highlighting. As it turned out, it... can 8) Of course! So far, so good, but when I exported it, saved and inspected in my browser, I noticed that whole indentation was gone.

It was gone, turns out, because it consisted of non-breaking spaces (ASCII 160) instead of standard spaces (ASCII 32), and I set my editor to remove these chars (Options > File > Miscellaneous > Remove any characters...) on save. Now, why would anybody need to use non-breaking spaces for indentation, if the whole clip is surrounded by <pre></pre> tags? Someone who wrote code for "Copy as HTML (black and white)" 8) realized this and used standard spaces. I believe they should be used in "Copy as HTML" as well.

And while I am at it: there's no need to surround indentation with <span></span>. Also "style" attribute value for <pre> tag instead of

Code: Select all

font-family: Fira Code;font-size: 12 pt;
could be just

Code: Select all

font-family: monospace;
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6628
Joined: 19 Jul 2006 14:29

Re: Use standard spaces for indentation in "Copy as HTML"

Post by Rickard Johansson »

Done in next release (v15.92). Thanks!
Post Reply