Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html following a function parsing issue #64

Open
EricRohlfs opened this issue Dec 11, 2024 · 0 comments
Open

html following a function parsing issue #64

EricRohlfs opened this issue Dec 11, 2024 · 0 comments

Comments

@EricRohlfs
Copy link

EricRohlfs commented Dec 11, 2024

(Love the tool by the way. Nice work. )
The issue is a template literal function that is returned by a function.

import {html, htmlBuilder} from './mySanitizer'

// The following works

const str = html`<div>${content}</div>`

Below does not work. It kind of works but blows out the syntax highlighting for the rest of the file. 

const str = htmlBuilder(this).html`<div>${content}</div>`

My fix is htmlBuilder(this).html/*html*/`<div></div>`

I'd like to not have to add the comment.

The issue is a template literal function that is returned by a function causes the rest of the page to change in subtle ways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant