Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

html following a function parsing issue #64

@EricRohlfs

Description

@EricRohlfs

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions