Skip to content

Commit 6aa9f77

Browse files
committed
Partial call with line breaks fix #660
1 parent b14dc01 commit 6aa9f77

File tree

2 files changed

+20
-1
lines changed
  • handlebars/src

2 files changed

+20
-1
lines changed

handlebars/src/main/antlr4/com/github/jknack/handlebars/internal/HbsLexer.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ ID
333333
fragment
334334
ID_START
335335
:
336-
[a-zA-ZА-Яа-я_$@:\u0001-\u001E\u00C0-\u00FF]
336+
[a-zA-ZА-Яа-я_$@:\u0001-\u0009\u000b-\u001E\u00C0-\u00FF]
337337
;
338338
339339
fragment
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.github.jknack.handlebars.issues;
2+
3+
import com.github.jknack.handlebars.v4Test;
4+
import org.junit.Test;
5+
6+
public class Issue660 extends v4Test {
7+
8+
@Test
9+
public void partialWithLineBreak() throws Exception {
10+
shouldCompileTo("text text text\n"
11+
+ "{{#>some-partial param1=\"val1\"\n"
12+
+ " param2=\"val2\"}}\n"
13+
+ " default content\n"
14+
+ "{{/some-partial}}", $, "text text text\n"
15+
+ "\n"
16+
+ " default content\n");
17+
}
18+
19+
}

0 commit comments

Comments
 (0)