File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { Coverage } from './parse-coverage.js'
22import { ext } from './ext.js'
33import { remap_html } from './remap-html.js'
44
5- export function is_html ( text : string ) : boolean {
5+ function is_html ( text : string ) : boolean {
66 return / < \/ ? ( h t m l | b o d y | h e a d | d i v | s p a n | s c r i p t | s t y l e ) / i. test ( text )
77}
88
@@ -11,11 +11,11 @@ const SELECTOR_REGEX = /(@[a-z-]+|\[[^\]]+\]|[a-zA-Z_#.-][a-zA-Z0-9_-]*)\s*\{/
1111// Check for CSS properties (property: value pattern)
1212const DECLARATION_REGEX = / ^ \s * [ a - z A - Z - ] + \s * : \s * .+ ; ? \s * $ / m
1313
14- export function is_css_like ( text : string ) : boolean {
14+ function is_css_like ( text : string ) : boolean {
1515 return SELECTOR_REGEX . test ( text ) || DECLARATION_REGEX . test ( text )
1616}
1717
18- export function is_js_like ( text : string ) : boolean {
18+ function is_js_like ( text : string ) : boolean {
1919 try {
2020 // Only parses the input, does not execute it.
2121 // NEVER EXECUTE THIS UNTRUSTED CODE!!!
You can’t perform that action at this time.
0 commit comments