diff --git a/src/parse-result.test.ts b/src/parse-result.test.ts index 003bd0e7..688bca81 100644 --- a/src/parse-result.test.ts +++ b/src/parse-result.test.ts @@ -1,4 +1,4 @@ -import { builders, parse, print, transform } from '.'; +import { builders, parse, print, transform, traverse } from '.'; import type { ASTv1 as AST } from '@glimmer/syntax'; import stripIndent from 'outdent'; @@ -550,6 +550,25 @@ describe('ember-template-recast', function () { `); }); + test('issue can handle angle brackets in modifier argument values', function () { + let template = ` + + `; + let ast = parse(template); + traverse(ast, { + ElementNode(node) { + node.tag = `${node.tag}`; + }, + }); + expect(print(ast)).toEqual(template); + }); + test('issue 706', function () { let template = `
' : '>'); + // Match closing index after start of block params to avoid closing tag if /> or > encountered in string + const closeOpenIndex = + nodeInfo.source.substring(blockParamStartIndex).indexOf(selfClosing ? '/>' : '>') + + blockParamStartIndex; postBlockParamsWhitespace = nodeInfo.source.substring( blockParamsEndIndex + 1, closeOpenIndex