mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
5 changed files with 24 additions and 1 deletions
@ -1,7 +1,8 @@ |
|||
import Node from '../Node.js'; |
|||
|
|||
export default class TemplateLiteral extends Node { |
|||
render ( code ) { |
|||
render ( code, es ) { |
|||
code.indentExclusionRanges.push([ this.start, this.end ]); |
|||
super.render( code, es ); |
|||
} |
|||
} |
|||
|
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'identifiers in template literals are rendered correctly' |
|||
}; |
@ -0,0 +1,7 @@ |
|||
function x ( keypath ) { |
|||
return 'a'; |
|||
} |
|||
|
|||
export default function a () { |
|||
return x(); |
|||
} |
@ -0,0 +1,7 @@ |
|||
function x ( name ) { |
|||
return 'b'; |
|||
} |
|||
|
|||
export default function b () { |
|||
return `${x()}`; |
|||
} |
@ -0,0 +1,5 @@ |
|||
import a from './a.js'; |
|||
import b from './b.js'; |
|||
|
|||
assert.equal( a(), 'a' ); |
|||
assert.equal( b(), 'b' ); |
Loading…
Reference in new issue