Closed jordanbtucker closed 1 year ago
On deeper investigation, it looks like this issue stems from the implementation of ToText
in https://github.com/EPD-Libraries/msbt. Let me know if you'd like me to open an issue there, or if you are able to transfer this one.
I can't transfer across organizations, so that'd be great if you can.
Can we re-open this? cs-msbt
needs to update its msbt
submodule, then this repo needs to update its cs-mbst
submodule before this is actually fixed.
When I re-implement the MSBT editor I'll make sure to update the library. Next release won't be for a bit though cause there's some major changes being made.
When opening an MSBT file, it is converted to YAML, however the generated YAML uses Literal Style blocks without the Block Chomping Indicator, so the text always includes an ending line break. When converting the YAML to something else, like JSON, this preserves the ending line breaks that don't actually exist in the MSBT.
For example,
ActorMsg/PouchContent.msbt
insideMals/USen.Product.110.sarc.zs
contains item names and descriptions when viewing them from the inventory. Here's a snippet of YAML produced by NxEditor.When converting this YAML to JSON, you get the following.
Notice that both entries contain ending line breaks (
\n
) which aren't present in the original MSBT file.This fix for this is to use YAML's Block Chomping Indicator like this.
Note the
|-
literal indicators instead of|
. When converting this to JSON, you get the correct result.Note that the line breaks inside the text are preserved as they exist in the original MSBT, but the ending line breaks are removed as they should be.