If you are requesting technical assistance with Twine, please specify:
Twine Version: 2.3.14
Story Format: Unsure
Hiya, is there a way to get Twine to insert more newlines when saving to a .html file? Currently my story has all of the content, including different passages, on a single line of code. This means that Git will have a hard time resolving conflicts if different people are editing different parts of it.
Is there any way to get it to save with different passages - or, even better, different lines of code within the passage - on different lines of the output HTML? This would allow for much easier collaboration with Git’s inbuilt features.
Thanks a lot!
I don’t know of any way to do it with Twine per se, but other people might have clever suggestions.
My first guess would be to use a precommit hook to format it for you, or (more readable, but also more work) convert it back and forth to Twee with something like Tweego or twine-utils.
1 Like
The Story HTML file you generated using the Twine 2,x application is a single page web-application, and generally when building web-applications you would version control the components used to generated the end-result (the HTML file) and not the end-result itself.
This is difficult to do with a project created with the Twine 2.x application because:
- the Web-browser based release stores the project’s components (the Passages) within your web-browser’s Local Storage area/cache.
- the Desktop based release stores the the project’s components within a Story HTML file it generates for you in the folder the application’s uses to store its projects.
The general advise given to those that want to use version control on a Twine project is to either:
- switch the project to being TWEE Notation based, and use a TWEE Compiler like TweeGo to generate your Story HTML file.
- stay with a Twine 2.x application based project, but use a TWEE decompiler like like TweeGo to generate a single TWEE file from your project HTML file and version control the TWEE file instead.
The above works because the code contained within the TWEE file(s) will include actual line-breaks.
5 Likes