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
Desktop: Fixes #8448: Merge changes from upstream turndown project #8468
Desktop: Fixes #8448: Merge changes from upstream turndown project #8468
Conversation
const replaceNonbreakingSpaces = space => { | ||
// \u{00A0} is a nonbreaking space | ||
return space.replace(/\u{00A0}/ug, this.options.nonbreakingSpace); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this function after merging changes to optionally replace \u00A0
characters with
, making non-breaking spaces noticeable within the markdown editor.
@@ -5,5 +5,6 @@ | |||
| [Source](https://github.com/nim-lang/nim) | The github project | | |||
| [nimble](https://github.com/nim-lang/nimble) | The nim package manager | | |||
| [choosenim](https://github.com/dom96/choosenim) | Toolchain installer | | |||
| | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTML input file corresponding to this test contains
<tr>
<td> </td>
<td></td>
</tr>
which was previously ignored.
It is no longer ignored and thus the test output has been updated.
Thanks, I think that's a good change, as long as our existing test units are still passing.
There's also turndown-plugin-gfm that contains a lot of improvements for the web clipper, but if it needs to be updated we can do so in a separate PR. |
I've done a small amount of testing and WebClipper still works (and produces similar output). I'm testing with WebClipper from the Chrome store and the development version of Joplin (changing the web clipper port accordingly). ExampleClipping the main GitHub repository page for JoplinOld version of turndown: New version: I've updated the turndown README with information about the commit that changes are based on. |
Looks good, thanks @personalizedrefrigerator! |
Summary
The upstream turndown project has bug fixes related to code blocks and whitespace. This should fix #8448 and should partially fix #8435.
Notes
Because this pull request may require further testing, it's still a draft.