Open rururux opened 3 years ago
I see. Seems like we are currently looking for content we support trimming of even inside the mustache tags themselves. I'll stop it from descending tags inner content and add some basic tests latter tonight.
@firefish5000, I have the same problem. The minimal code to reproduce is:
<script>
let visible = true;
</script>
{#if visible}
<p>Some text</p>
{/if}
Gives some AST parsing/building error when used with svelte-trim preprocessor:
Error: Unsupported mustache syntax detected!
Node type: "Fragment"
Text: "{#if visible}\r\n
With any combination of options:
const { asMarkupPreprocessor } = require('svelte-as-markup-preprocessor')
const sveltePreprocess = require('svelte-preprocess')
const { mdsvex } = require('mdsvex')
const { svelteTrim } = require('svelte-trim')
...
preprocess: [
asMarkupPreprocessor([
sveltePreprocess(),
mdsvex(),
]),
svelteTrim({
// removalMethod: 'trim',
removalMethod: 'comment',
inline: false,
// multiline: true,
multiline: false,
// componentSiblings: true,
componentSiblings: false,
// elementSiblings: true,
elementSiblings: false,
// mustacheBlockSiblings: true,
mustacheBlockSiblings: false,
// mustacheDirectiveSiblings: true,
mustacheDirectiveSiblings: false,
// mustacheTextSiblings: false,
mustacheTextSiblings: true,
}),
],
Hi, I have the same problem. Somebody has the solution to fix it? @firefish5000 do you continue to support this preprocessor?
svelteTrim throw an error when i used toLocaleString.
code:
error log: