"Copy As BBCode" issues

Scrivener, Windows 8.1

  1. The incorrect tag nesting that I reported in the Mac Bug Hunt forum is also reproducible in Windows, and needs to be fixed in both places.

However, unfortunately, added to that:

  1. Windows “Copy As BBCode” drops special characters such as em dashes and ellipses, which is a much more severe problem for me.


  • Turn on “Replace double hyphens with em dashes” and “replace triple periods with ellipses” in Options > Corrections
  • Type a sentence using both of them
  • Highlight and copy/paste and the punctuation shows up correctly: “We — which is to say, I — would like this fixed … please?
  • Highlight and “Copy As BBCode” and you get: "
    [ b ]We — which is to say, I — [ /b ][ b ][ i ]would like this fixed[ /b ][ /i ][ b ] … please?[ /b ]"
    (spaces added to BBCode tags for display purposes)

I note that it is copying both spaces on the sides of the missing punctuation, and if I place my cursor at the end of “We” and press the right arrow key, it pauses for a keypress in between the two spaces; so it looks like there’s something being pasted, but whatever it is is a non-printing character.

Unfortunately, both of these things remain problems as of 1.9.7. I know you’re not getting a large volume of complaints about this, but it’s really been crimping my blogging and fanfic workflow for years now.

I’m either gonna have to switch back to a Mac or switch word processors at some point. As lovely as the former would be, I’m starting to consider the latter’s charms. :frowning:

You got my hopes up when you added the MultiMarkdown converter, but unfortunately with the double and single asterisks it’s impossible to do that and then a search/replace to turn them into [ b ] and [ i ] tags, and even the “Copy as Simple HTML” option massively overcomplicates the tags. I just need some way to get bold and italic formatted text to a BBCode-supporting website submit box, without losing common punctuation like em dashes! :cry:

Oh, did L&L fix this algorithm on the Mac?

Last I messed with Scriv’s BBCode converter, it was truncating text on nested tags:

Copy Special to BBCode: Tag nesting and truncation

I didn’t actually need BBCode, but something very similar: the lightweight HTML required by WordPress, upon which WP superimposes your theme’s style sheet. Wound up writing my own converter in AutoHotKey. Not that complicated. You start with the “Copy to HTML” output. You scan each tag for style parameters. You add the corresponding simplified tags in scanned order to an “open” stack, and in reverse order to a “close” stack. That takes care of the nesting. Another stack enables you to strip some of the redundant block boundaries, making your output a thing of beauty.


IfInString, TagStyles,font-weight:600;
InTags := InTags . "<b>"
OutTags := "</b>" . OutTags
StripTags := "</b><b>"

In my respectful view, as a primo Scriv fan, this one should have been fixed ages ago, or removed from the menu.

Rgds – Jerome