@patternfly/quickstarts 6.2.0-prerelease.5 → 6.2.0-prerelease.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +9 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/quickstarts-full.es.js +9 -2
- package/dist/quickstarts-full.es.js.map +1 -1
- package/package.json +1 -1
- package/src/ConsoleInternal/components/markdown-view.tsx +14 -2
|
@@ -28731,8 +28731,15 @@ const markdownConvert = (markdown, extensions) => __awaiter(void 0, void 0, void
|
|
|
28731
28731
|
node.setAttribute('xlink:show', 'new');
|
|
28732
28732
|
}
|
|
28733
28733
|
});
|
|
28734
|
-
|
|
28735
|
-
|
|
28734
|
+
const reverseString = (str) => str.split('').reverse().join('');
|
|
28735
|
+
// replace code fences that end in a double curly brace (which are used by our custom md extensions) with non
|
|
28736
|
+
// markdown formatting related tokens so that marked doesn't try to parse them as code spans
|
|
28737
|
+
//
|
|
28738
|
+
// we want to reverse the string before we do the substitution so that we only match the opening code fence which
|
|
28739
|
+
// corresponds to the closing code fence with the double curly brace
|
|
28740
|
+
const reversedMarkdown = reverseString(markdown);
|
|
28741
|
+
const reverseMarkdownWithSubstitutedCodeFences = reversedMarkdown.replace(/{{```((.|\n)*?)```/g, '{{@@@$1@@@');
|
|
28742
|
+
const markdownWithSubstitutedCodeFences = reverseString(reverseMarkdownWithSubstitutedCodeFences);
|
|
28736
28743
|
const parsedMarkdown = yield marked.parse(markdownWithSubstitutedCodeFences);
|
|
28737
28744
|
// Swap the temporary tokens back to code fences before we run the extensions
|
|
28738
28745
|
let md = parsedMarkdown.replace(/@@@/g, '```');
|