Closed wKich closed 7 years ago
oh @wKich thanks for reporting this. Can you check if this is happening on latest version? (demo is not using the latest, will have to update it soon)
Checked on latest version, output the same.
I did some research and we can fixed this problem modify RegExp in this line to
new RegExp(`<__JSXExpression_0_${ idx }\\s*\\/>`);
Because js-beautify
insert new line character here if JSXExpression
placeholder tag follow by unformatted html tag and line length bigger then wrap_line_length
option.
I try to make PR. But I think somewhere in options reading there is another bug. If I specify for my test case htmlOptions.unformatted
default array from js-beautify
package, then the some other test cases after my will fail. It easily check if specify this in the first test case options json
"unformatted": [
"a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite",
"code", "data", "datalist", "del", "dfn", "em", "embed", "i", "iframe", "img",
"input", "ins", "kbd", "keygen", "label", "map", "mark", "math", "meter", "noscript",
"object", "output", "progress", "q", "ruby", "s", "samp", "select", "small",
"span", "strong", "sub", "sup", "svg", "template", "textarea", "time", "u", "var",
"video", "wbr", "text",
"acronym", "address", "big", "dt", "ins", "small", "strike", "tt",
"pre"
]
Here is the link to online demo. I think it's close to #60, but has something different behavior.