Open ekhaled opened 1 year ago
A possible fix is:
const parsedText = text.split(/\n/)
.map((line) => {
return line.trim()
.replace(/^\/\*+/, '').trim()
.replace(/\s*\*+\/$/, '').trim()
+ .replace(/import\((\s*)(['|"])\@/, "import($1$2").trim()
.replace(/^\s*\*/, '').trim();
})
.join('\n')
.trim();
Not sure, how open you are to that
This works:
However, this doesn't:
The problem is this line https://github.com/alexprey/sveltedoc-parser/blob/dev/lib/utils.js#L7 That regex fails because of the second
@
symbol on that line.