mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
This reverts commit 32425497f7
.
This commit is contained in:
parent
5aca1d739c
commit
7c7e0c24f6
1 changed files with 4 additions and 2 deletions
|
@ -84,7 +84,7 @@ const highlightDirectiveRegex = (lang) => {
|
|||
return getHighlightDirectiveRegex();
|
||||
}
|
||||
};
|
||||
const codeBlockTitleRegex = /(?<=title=").*(?=")/;
|
||||
const codeBlockTitleRegex = /title=".*"/;
|
||||
|
||||
export default ({
|
||||
children,
|
||||
|
@ -125,7 +125,9 @@ export default ({
|
|||
// Tested above
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
codeBlockTitle = metastring
|
||||
.match(codeBlockTitleRegex)![0];
|
||||
.match(codeBlockTitleRegex)![0]
|
||||
.split('title=')[1]
|
||||
.replace(/"+/g, '');
|
||||
}
|
||||
|
||||
let language =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue