mirror of
https://github.com/andatoshiki/toshiki-notebook.git
synced 2026-06-06 06:55:55 +00:00
fix: remove unused markdown transformation utilities that causes build failure after replacement when calling vue3 as vite plugin
This commit is contained in:
parent
ff15b48b44
commit
35020a5fa7
@ -13,13 +13,16 @@ export function MarkdownTransform(): Plugin {
|
|||||||
const [_name, i] = id.split('/').slice(-2)
|
const [_name, i] = id.split('/').slice(-2)
|
||||||
|
|
||||||
// convert img by applying regex
|
// convert img by applying regex
|
||||||
const imgRegex = /!\[(.+?)\]\((.+?)\)/g
|
// const imgRegex = /!\[(.+?)\]\((.+?)\)/g;
|
||||||
let imgMatches = imgRegex.exec(code)
|
// let imgMatches = imgRegex.exec(code);
|
||||||
while (imgMatches) {
|
// while (imgMatches) {
|
||||||
const [text, link] = imgMatches.slice(1)
|
// const [text, link] = imgMatches.slice(1);
|
||||||
code = code.replace(imgMatches[0], `<img src="${link}" alt="${text || 'img'}" />`)
|
// code = code.replace(
|
||||||
imgMatches = imgRegex.exec(code)
|
// imgMatches[0],
|
||||||
}
|
// `<img src="${link}" alt="${text || "img"}" />`
|
||||||
|
// );
|
||||||
|
// imgMatches = imgRegex.exec(code);
|
||||||
|
// }
|
||||||
|
|
||||||
// convert links to components
|
// convert links to components
|
||||||
const linkRegex = /\[(.+?)\]\((.+?)\)/g
|
const linkRegex = /\[(.+?)\]\((.+?)\)/g
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user