Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

ZWNJs in compiled html

edited February 2015 in Help! with 1.x
I've digged all forum and found that the issue with <<nobr>> was fixed already but somehow it stalks me in 1.4.2.
Great number of $zwnj; keeps adding in compiled html.
And strange thing: when I click on some of them in Chrome code review, they disappear.

This how it looks initially.
And this when I clicked out all of disappearing ones.

I'm attaching the source file if you are curious (yeah, I'm using twee instead of Twine, but after importing sources in Twine problem still appears).
And sorry for language.

Comments

  • cheshire wrote:

    I've digged all forum and found that the issue with <<nobr>> was fixed already but somehow it stalks me in 1.4.2.


    You seem to be mistaken.  The only zero width non-joiner (ZWNJ) issue in the vanilla story formats which was addressed was inside macro's argument string.  Nothing else was changed.
  • TheMadExile wrote:

    cheshire wrote:

    I've digged all forum and found that the issue with <<nobr>> was fixed already but somehow it stalks me in 1.4.2.


    You seem to be mistaken.  The only zero width non-joiner (ZWNJ) issue in the vanilla story formats which was addressed was inside macro's argument string.  Nothing else was changed.


    Oh, you are right... I've mixed it with something else. And that's bad. The bug ruins all appearance in my story. Any advice?
  • Open your twee file in a text editor and use it's find-n-replace functionality to remove the indentation character you are using at the start of each line.
  • I'm in agreement with greyelf.  The easiest thing to do is to simply remove all indentation.  Your problem is largely because you're indenting various lines in your Twee source, not specifically because of the ZWNJ.  It wouldn't be a problem without the ZWNJ, true, but it's the indention which is making the ZWNJ a problem here.

    Another option would be to use the line continuation marker (\), which does not insert the ZWNJ.  For example:

    /% Instead of this. %/
    <<nobr>>
    ABC
    123
    <<endnobr>>

    /% Do this. %/
    ABC\
    123
  • I've tried both methods and unfortunately it wasn't ideal.
    Backslash never quite worked for me: on some lines it does what it should, on others doesn't.
    Source with deleted indentations gives perfect output, but its low readability is too high price for me.
    Now I think about using Sugarcube instead. It seems more consistent than Sugarcane.

    Thanks for all your help!
Sign In or Register to comment.