File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/babel-plugin-transform-jsx-to-htm Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff 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 */
1010export 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 ) ;
You can’t perform that action at this time.
0 commit comments