You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Desktop: Fixes #5626: When web clipper clipping code blocks, keep code in multiline and delete code number lines (#10126)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com> Co-authored-by: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,15 @@ export default class HtmlToMd {
|
||||
if (node.matches('object')) {
|
||||
return pdfRule.replacement(content, node, {});
|
||||
}
|
||||
|
||||
if (node.isCode) {
|
||||
// Fix: Web clipper has trouble with code blocks on Joplin's website.
|
||||
// See https://github.com/laurent22/joplin/pull/10126#issuecomment-2016523281 .
|
||||
// If isCode, blank keep empty
|
||||
// test case: packages/app-cli/tests/html_to_md/code_multiline_3.html
|
||||
return '';
|
||||
}
|
||||
|
||||
return '\n\n';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user