Skip to content

Commit 01e8e51

Browse files
committed
Add data handling for typescript
1 parent bd0bf20 commit 01e8e51

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Compiler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ public function registerProperties(DOMElement $scriptElement): void
496496
public function registerData(DOMElement $scriptElement): void
497497
{
498498
$content = $this->innerHtmlOfNode($scriptElement);
499+
$content = preg_replace('/\/*(.+?)*\//msi', '', $content);
499500
if ($scriptElement->hasAttribute('lang') && $scriptElement->getAttribute('lang') === 'ts') {
500501
// TypeScript
501502
preg_match_all('/private\s+(\S+)\s*=\s*(.+?);\n/msi', $content, $matches, PREG_SET_ORDER);

0 commit comments

Comments
 (0)