|
@@ -50,12 +50,16 @@ mdi.renderer.rules.table_close = function () { return '</table></div>'; };
|
|
|
mdi.use(markdownItSub);
|
|
|
mdi.use(markdownItSup);
|
|
|
|
|
|
-
|
|
|
+const transformText = (text) => {
|
|
|
+ return text.replace(/\b\w*_\w*\/\w*\W*\w*\b/g, function (match) {
|
|
|
+ return `$${match}$`;
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
const text = computed(() => {
|
|
|
let value = props.content ?? ""
|
|
|
value = value.replace(/\((\w+_\w+)\)/g, '($$$1$)');
|
|
|
-
|
|
|
+ value = transformText(value)
|
|
|
if (!props.asRawText)
|
|
|
return mdi.render(value)
|
|
|
return value
|