apply classes to whitespace and line breaks
Status: Beta
Brought to you by:
gnombat
For languages like Python, it would be awesome to hack whitespaces and line breaks visible.
attached, see a screenshot of what I mocked up. Using :before, this does not lead to altered code when one does copy+paste.
here is the css therefor:
pre.sh_sourceCode{
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
font-size:1em;
}
.sh_blank:before { content:"\00B7"; color: #c9b28f; overflow: hidden; width: 8px; margin-right:-8px; }
.sh_linefeed:before{ content:"\00B6"; color: #c9b28f; font-style:italic; overflow: hidden; width: 8px; margin-right:-8px }
prrof of concept
Apologies for claiming Copy+paste as no prob .. I just tested with IE and Opera ....
But, Firefox is fine with this.
line numbers with the same principle