-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paragraph tags misplaced for first paragraph in Windows #186
Comments
Thanks for reporting this. It is an issue with Marked I'd been fighting with for a long time. The newest build should fix it by no longer generating paragraph tags (and removing Marked from the project). |
Would you mind clarifying which build this is fixed in (and providing the URL for it so I can add it to Twine)? I have this issue with Snowman 2.0.2, and it's not clear to me if you're saying this is fixed in v3 (which I believe is not production-ready yet?) or some other version? thank you! |
Hi, @sheridanvk. The issue was fixed in the work toward Snowman 3.X. There have been no updates to Snowman 2.X since Summer 2022. |
Thanks for the fast reply! Is there a format link where I can try out 3.x? |
You can try this link or otherwise download the last format.js build from the latest experimental build from August 2023. However, this comes with a MAJOR caveat. I make absolutely no guarantee it will work. Snowman 3.X is very different than the Snowman 2.X branch. I'll re-open this issue for now for the 2.X branch, but I do not know when I can address it. |
If you create a new story in Windows using the latest Twine (2.39) and Snowman (2.0.2), the first paragraph in every passage will be missing its paragraph tags, which appear to be shifted onto the next line as an empty paragraph tag. While this has no obvious visual effect out of the box (you have to view the rendered source of the passage to see it), it will mess up any paragraph-based CSS or scripting.
This does not happen on (unix-based) MacOS X. It seems to be a result of some paragraph cleanup code at the end of Passage.js aimed at fixing marked output. The code assumes unix newlines (
\n
) instead of windows newlines (\r\n
). There are other cases as well, like classic mac newlines (\r
), but Twine users are unlikely to run into them.Note that importing a story into a Windows Twine can preserve unix newlines, and then the problem won't occur. (It's not clear exactly what the import and Twine are doing, but for a story I imported the newlines remained unix-style even after some editing in Windows.)
As a temporary workaround I suggested converting the published story to unix newlines, but the original reporter (bphennessy on discord) went with a jQuery fix instead:
To fix Snowman itself I assume a better regex would be sufficient, depending on what problem the code was fixing:
Since I can't reproduce the original issue (my stories behave the same with and without the paragraph correction code) I can't be sure that actually works as intended.
The text was updated successfully, but these errors were encountered: