Cannot use Live Template for tag name

Answered

Hi!

I'm trying to insert Live Template prompt inside a File Template (with "Enable Live Templates" on).

Everything works fine until I try to prompt a tag name (using symbols '<') - then the output is completely broken..

Here's the template: 

const React = require('react');

export default class $NAME extends React.Component {
render() {
return (
<#[[$section$]]#>
#[[$END$]]#
</#[[$section$]]#>
);
}
}

And the output:

const React = require('react');

export default class Test extends React.Component {
render() {
return (
<$section $>

</$section
$>
)
;
}
}

I even tried surrounding '<' with #[[<]]# - no effect

Thanks

1 comment
Comment actions Permalink

Logged as https://youtrack.jetbrains.com/issue/WEB-21879, please vote for it.

Try disabling 'Reformat according to style' in file template properties - works for me

0

Please sign in to leave a comment.