Fix #1326 - Allow <script type="py"> tag to work as <py-script> (#1396)

The goal of this MR is to unobtrusively allow the usage of `<script type="py">`, `<script type="pyscript">` or `<script type="py-script">` tags instead of `<py-script>` for all those case where the layout in custom elements get parsed and breaks users' expectations (including our SVG based tests).
This commit is contained in:
Andrea Giammarchi
2023-04-27 15:21:31 +02:00
committed by GitHub
parent 074ca0ef8f
commit a1281d1331
5 changed files with 141 additions and 51 deletions

View File

@@ -9,10 +9,10 @@ class TestBasic(PyScriptTest):
def test_pyscript_hello(self):
self.pyscript_run(
"""
<py-script>
<script type="py">
import js
js.console.log('hello pyscript')
</py-script>
</script>
"""
)
assert self.console.log.lines == ["hello pyscript"]