Copy PlainText needs a setting to replace ‘\t’ with a fixed number of spaces (e.g. 4, 8, etc…). The problem being, much of the code that gets copied is copied with tabs (that’s just pure damn evil). A simple substitution from tabs to spaces (or option to do that) would make Copy Plain Text much more useful in those circumstances. Yes, you can always substitute in the target editor, but a simple substitute would be a simple useful addition.
Copy PlainText does replace
\t (one or more) with a single space at the moment.
If that is not happening, please give me an example where I can test it.
However, adding more control i.e. replacing
\twith x number of spaces is possible.
Sure, happy to. Copy the code at http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/init.html#INITEX (I pasted it into kwrite (KDE3)). It pasted with
'\t' all though the code to provide the indention and I had to do a global regex search and replace all the
\t with 4-spaces. Not a huge deal, but if Copy Plain Text is supposed to substitute – it ain’t
Wait! My bad, Copy Plain Text places the result in the copy-buffer, not the select-buffer. The text in the copy-buffer does have tabs substituted, but that is the least of the problems, the code loses all the line-endings as well and is completely unreadable. Yikes. Take a look, see what your results are, there is something fishy about how that is being handled.
The formatting of placing an
<span> inside a
<pre> that is used there is rather odd.
Nonetheless, removing formatting from inside a pre or textarea (or other input) works differently than copying text form normal HTML nodes.
Add-on gets the data that is passed to it by the WebExtenion API and that is how it is passed to it. I will have to look into it a bit more.
I filed a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1427298
Thank you. Keep up the great work with Copy PlainText.