Skip to content

Commit

Permalink
refactor: improve get content for anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
niquenen committed Sep 20, 2024
1 parent 14bd2b1 commit 7fc6a69
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ export function getContent(node: TNode): Nullable<string>
result += serialize(
node.children[index]!,
{decodeEntities: true}
).replace(
/\r\n|\n/gu,
' '
).replace(/\p{Zs}+/gu, ' ').replace(/^\p{Zs}+|\p{Zs}+$/gu, '');
).replace(/^\p{Zs}+|\p{Zs}+$/gu, '');
if (node.children[index + 1]) {
result += ' ';
}
Expand Down

0 comments on commit 7fc6a69

Please sign in to comment.