Skip to content

strange issue where part of txt is lost #7

@xdadda

Description

@xdadda

Hi,

this is the sample code generating the error

import { minifyHTMLLiterals } from "minify-literals";
const source = `
    const o=30;
    const el = html\`<div style="height:\${o}px;"> <h1>  Hello World  </h1 > </div>\`;
`;
let { code, map } = await minifyHTMLLiterals(source);
console.log(code);

output:
const o=30;
const el = html<div style="height:${o}"><h1>Hello World</h1></div>;

error: missing 'px;' after ${o}

desired output:
const o=30;const el = html<div style="height:${o}px;"><h1>Hello World</h1></div>;

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