-
Notifications
You must be signed in to change notification settings - Fork 50
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
Words reflowed across a line break in objective text are missing a space between them #1409
Comments
I think this was introduced in #1106 . |
@byorgey it was for sure, I was just lucky to not hit this during testing or did not notice. 😄 I am debugging it and will have a fix soon or revert. |
Oh no, I did not realise the parser splits on every single token, so the created tree looks like this: d =
Document
{ paragraphs =
[ Paragraph
{ nodes =
[ LeafText (fromList []) "A"
, LeafText (fromList []) " "
, LeafText (fromList []) "pedestal" There are spaces in this structure where they should be, but this is definitely not what I expected when writing code that works with it. |
Hah, that is an interesting choice. So if you just concatenate all the parsed nodes do you get back the exact original text? |
@byorgey yes, now that I fixed chopping, you should get almost exactly the original text. |
Notice "nextto" and "samedirection" in the screenshot above. Notice that "to build" has a space even though those words are also on separate lines in the
.yaml
file. I think the difference may be that "next to" and "same direction" are contained in quoted (i.e. starting with a|
) text in the.yaml
file whereas "to build" is in unquoted text. For reference, here is the relevant.yaml
file:https://github.com/swarm-game/swarm/blob/1eb2f9c567b51a5242323bdf59277aff5879618a/data/scenarios/Tutorials/build.yaml
The text was updated successfully, but these errors were encountered: