Skip to content

Commit 83e08d3

Browse files
committed
Revert #189
1 parent 619c329 commit 83e08d3

File tree

1 file changed

+2
-4
lines changed
  • packages/babel-plugin-transform-jsx-to-htm

1 file changed

+2
-4
lines changed

packages/babel-plugin-transform-jsx-to-htm/index.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import jsx from '@babel/plugin-syntax-jsx';
44
* @param {Babel} babel
55
* @param {object} [options]
66
* @param {string} [options.tag='html'] The tagged template "tag" function name to produce.
7-
* @param {boolean} [options.terse=false] Collapse whitespace and use `<//>` for closing component tags
7+
* @param {boolean} [options.terse=false] Use `<//>` for closing component tags
88
* @param {string | boolean | object} [options.import=false] Import the tag automatically
99
*/
1010
export default function jsxToHtmBabelPlugin({ types: t }, options = {}) {
@@ -119,9 +119,7 @@ export default function jsxToHtmBabelPlugin({ types: t }, options = {}) {
119119
for (let i = 0; i < children.length; i++) {
120120
let child = children[i];
121121
if (t.isStringLiteral(child)) {
122-
let value = child.value;
123-
if (terse) value = value.replace(/\n+/g, ' ');
124-
escapeText(value);
122+
escapeText(child.value);
125123
}
126124
else if (t.isJSXElement(child)) {
127125
processNode(child);

0 commit comments

Comments
 (0)