mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 21:14:32 +00:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1116 Closes #982 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
93885530c8
1 changed files with 9 additions and 3 deletions
|
@ -75,9 +75,8 @@ export class MfmService {
|
||||||
switch (node.tagName) {
|
switch (node.tagName) {
|
||||||
case 'br': {
|
case 'br': {
|
||||||
text += '\n';
|
text += '\n';
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'a': {
|
case 'a': {
|
||||||
const txt = getText(node);
|
const txt = getText(node);
|
||||||
const rel = node.attribs.rel;
|
const rel = node.attribs.rel;
|
||||||
|
@ -123,9 +122,16 @@ export class MfmService {
|
||||||
|
|
||||||
text += generateLink();
|
text += generateLink();
|
||||||
}
|
}
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't produce invalid empty MFM
|
||||||
|
if (node.childNodes.length < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (node.tagName) {
|
||||||
case 'h1': {
|
case 'h1': {
|
||||||
text += '**【';
|
text += '**【';
|
||||||
appendChildren(node.childNodes);
|
appendChildren(node.childNodes);
|
||||||
|
|
Loading…
Add table
Reference in a new issue