mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
copy changes from toHtml to toMastoApiHtml
This commit is contained in:
parent
067d56ba03
commit
3034c94c24
1 changed files with 4 additions and 1 deletions
|
@ -850,11 +850,14 @@ export class MfmService {
|
|||
|
||||
let result = new XMLSerializer().serializeToString(body);
|
||||
|
||||
// Remove the unnecessary namespace
|
||||
result = result.replace(/^\s*<p xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">/, '<p>');
|
||||
|
||||
if (inline) {
|
||||
result = result.replace(/^<p>/, '').replace(/<\/p>$/, '');
|
||||
}
|
||||
|
||||
happyDOM.close().catch(e => {});
|
||||
happyDOM.close().catch(() => {});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue