@mintlify/common 1.0.1285 → 1.0.1287
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.
|
@@ -55,9 +55,12 @@ function sanitizeNodes(nodes, source) {
|
|
|
55
55
|
}
|
|
56
56
|
return sanitized;
|
|
57
57
|
}
|
|
58
|
+
const MARKDOWN_SYNTAX = /[\\&*_`[\]!<>~@\0\t\n\r]|:\/\/|www\.|\s$/i;
|
|
58
59
|
export function parseTitleMarkdown(value) {
|
|
59
60
|
if (!value)
|
|
60
61
|
return [];
|
|
62
|
+
if (!MARKDOWN_SYNTAX.test(value))
|
|
63
|
+
return [{ type: 'text', value }];
|
|
61
64
|
try {
|
|
62
65
|
const prefix = 'title: ';
|
|
63
66
|
const source = `${prefix}${value.replace(/\n/g, ' ')}`;
|