Open galiazzi opened 2 weeks ago
@lucacasonato @dsherret
It's Failed to assure format stability: "I tried to match if the current formatted text matches the following formatted file format, if the first four attempts do not match, will panic" So, I advise providing an external option flag in fmt to raise the number of format tries. Instead of panicking, we should provide the error message that tells them to delete certain break lines that can cure the problem and inform them how to increase the number of format stability tests? or it requires searches on upstream of the issue.
--unstable-html—what does it mean? it should not format if format not stable
So, I advise providing an external option flag in fmt to raise the number of format tries.
I don't think we should do that. This is a bug that should be fixed and in the meantime the file the issue occurs on can be ignored.
An information, If the file is a vue the problem don't occurs:
<!-- tt.vue -->
<script>
{
`First line
second line`;
}
</script>
deno fmt --unstable-component tt.vue
# this works
Checked 1 file
Tracked in: https://github.com/g-plane/markup_fmt/issues/50
Version: Deno 1.46.1
An error occurs when trying to format an html file with script and a template string inside a block with break lines.
Example: