mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-21 09:16:41 +02:00
return comment
This commit is contained in:
@@ -188,6 +188,8 @@ export const parseGenericTypes = function (text: string): string {
|
|||||||
if (text.split('~').length - 1 >= 2) {
|
if (text.split('~').length - 1 >= 2) {
|
||||||
let newCleanedText = cleanedText;
|
let newCleanedText = cleanedText;
|
||||||
|
|
||||||
|
// use a do...while loop instead of replaceAll to detect recursion
|
||||||
|
// e.g. Array~Array~T~~
|
||||||
do {
|
do {
|
||||||
cleanedText = newCleanedText;
|
cleanedText = newCleanedText;
|
||||||
newCleanedText = cleanedText.replace(/~([^\s:;]+)~/, '<$1>');
|
newCleanedText = cleanedText.replace(/~([^\s:;]+)~/, '<$1>');
|
||||||
|
Reference in New Issue
Block a user