diff options
| author | Johann150 <johann.galle@protonmail.com> | 2021-11-05 03:54:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-05 11:54:26 +0900 |
| commit | 3db7551ad356a40562864aa2afd3dd645084a51d (patch) | |
| tree | 4ba0177d6c55873fcc68892b18733548848cc864 /src | |
| parent | fix missing i18n string (#7945) (diff) | |
| download | sharkey-3db7551ad356a40562864aa2afd3dd645084a51d.tar.gz sharkey-3db7551ad356a40562864aa2afd3dd645084a51d.tar.bz2 sharkey-3db7551ad356a40562864aa2afd3dd645084a51d.zip | |
fix html conversion issue with code blocks (#7943)
Diffstat (limited to 'src')
| -rw-r--r-- | src/mfm/from-html.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mfm/from-html.ts b/src/mfm/from-html.ts index 14279f3383..de6aa3d0cc 100644 --- a/src/mfm/from-html.ts +++ b/src/mfm/from-html.ts @@ -147,7 +147,7 @@ export function fromHtml(html: string, hashtagNames?: string[]): string | null { // block code (<pre><code>) case 'pre': { if (node.childNodes.length === 1 && node.childNodes[0].nodeName === 'code') { - text += '```\n'; + text += '\n```\n'; text += getText(node.childNodes[0]); text += '\n```\n'; } else { |