mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-18 09:07:57 +02:00
fix(v2): remove Markdown heading id from excerpt (#4862)
This commit is contained in:
parent
d2e4e60cd5
commit
644f148a8b
2 changed files with 10 additions and 0 deletions
|
@ -55,6 +55,8 @@ export function createExcerpt(fileString: string): string | undefined {
|
|||
.replace(/(:{3}.*)/, '')
|
||||
// Remove Emoji names within colons include preceding whitespace.
|
||||
.replace(/\s?(:(::|[^:\n])+:)/g, '')
|
||||
// Remove custom Markdown heading id.
|
||||
.replace(/{#*[\w-]+}/, '')
|
||||
.trim();
|
||||
|
||||
if (cleanedLine) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue