-
Notifications
You must be signed in to change notification settings - Fork 97
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
Don't append trailing newline when parsing markdown code blocks #202
Labels
bug
Something isn't working
Comments
thislooksfun
added a commit
to thislooksfun/svelte-repo-card
that referenced
this issue
Feb 7, 2021
This is pending sveltejs/prettier-plugin-svelte#202 because currently it wants to add a newline to the end of the code block, which is really annoying.
dummdidumm
pushed a commit
to dummdidumm/prettier-plugin-svelte
that referenced
this issue
Feb 8, 2021
Prettier's markdown parser tries to strip the last hardline of the embedded docs, but fails to do so in our case because it does not recurse into concat parts -> we need to strip it ourselves. Fixes sveltejs#202
dummdidumm
added a commit
that referenced
this issue
Feb 8, 2021
Prettier's markdown parser tries to strip the last hardline of the embedded docs, but fails to do so in our case because it does not recurse into concat parts -> we need to strip it ourselves. Fixes #202
@dummdidumm Thanks for the quick fix! Unfortunately it doesn't seem to be working in the wild (https://github.com/thislooksfun/svelte-repo-card @ README.md#73-81). Any ideas why it's not working for me? EDIT: Live example here |
dummdidumm
pushed a commit
to dummdidumm/prettier-plugin-svelte
that referenced
this issue
Feb 10, 2021
There were situations where the trim of the last line was not working. sveltejs#202
Merged
dummdidumm
added a commit
that referenced
this issue
Feb 10, 2021
There were situations where the trim of the last line was not working. #202
Thanks for the update, there was a situation the test did not catch, new release pending. |
Released |
That worked beautifully, thank you! |
This was referenced Mar 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Every other code block formatter (tested with
ts
,js
, andhtml
) leaves the fenced code blocks with no trailing newlines, but this one appends a trailing newline, which is therefore out of place and distracting. It would be great if this could leave 0 trailing newlines in these fenced blocks.EDIT: namely, remove line 20 of test/printer/samples/markdown.md.
The text was updated successfully, but these errors were encountered: