Skip to content

Conversation

@mikeando
Copy link
Contributor

There are three independent commits

The initial commit just tidies up parse_inline a little by:

  • assigning directly to new_inlas the return value from the match rather than inside each branch.
  • moving some if c=='X' && something() {...} conditions inside the default match arm into their own arms.

The second commit change the way hard linebreaks were rendered in the CM output from '␣␣\n' to '\\n' to allow
for round-tripping when the LineBreak was on an otherwise empty line.

The final commit just left-trims the content in parse_inline if the last node was a LineBreak.
This removes the extra space character that was found in #213.

I'm not 100% sure this is the right way to fix it, but all the cargo test tests pass, and the spec tests all parse.

@kivikakk
Copy link
Owner

Code changes are good, tested it out a bit locally, looks great — thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants