Cannot use <script lang= "ts" setup> in markdown
ProsperBao opened this issue · 5 comments
I noticed a file script-hoisting.test.ts
in the test case. I try to use the same syntax in example
, but I failed.
I tried a lot of ways. It seems that this part is all broken.
↓↓↓↓↓↓↓↓↓↓↓You can see examples here↓↓↓↓↓↓↓↓↓↓↓
demo
↑↑↑↑↑↑↑↑↑↑↑You can see examples here↑↑↑↑↑↑↑↑↑↑↑
@FuBaooo I am working a new PR and I have switched in your test file as the repo's primary test mechanism as it supports your view that this is not working as it should.
note that you can get everything to work if you're secondary script blocks are just <script>
blocks and not <script setup>
blocks, right? This is the difference which you introduced in repeating the <script setup>
block multiple times which I'm not sure would ever have worked. Does it say it should work in the docs?
I haven't tried <script>
yet, but I think <script setup>
should work normally since it is in the test case.
I tried to copy the usage method in the test example, but failed.I think since it is in the test case, it should work
note that you can get everything to work if you're secondary script blocks are just
<script>
blocks and not<script setup>
blocks, right? This is the difference which you introduced in repeating the<script setup>
block multiple times which I'm not sure would ever have worked. Does it say it should work in the docs?
The test case I had before worked fine but your test case added multiple <script setup>
blocks which did not work. I think in general it would be a better idea for people to add <script>
blocks in their code simply because the cardinality of <script>
is 1:M but that said I have updated the test to the more aggressive test you introduced and I have all tests passing there too now with a little refactoring. This code isn't released yet but will be soon.
this is fixed in v0.16.0