From 2e677551188e1e8bc5e86aec077b05ab404fc0ef Mon Sep 17 00:00:00 2001 From: David Jennes Date: Wed, 26 Sep 2018 03:06:49 +0200 Subject: [PATCH 1/2] Fix a bug where tokens without spaces were parsed incorrectly --- Sources/Lexer.swift | 2 +- Tests/StencilTests/LexerSpec.swift | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Sources/Lexer.swift b/Sources/Lexer.swift index 015b7d7..f6fc426 100644 --- a/Sources/Lexer.swift +++ b/Sources/Lexer.swift @@ -146,7 +146,7 @@ class Scanner { for (index, char) in content.unicodeScalars.enumerated() { if foundChar && char == Scanner.tokenEndDelimiter { - let result = String(content.prefix(index)) + let result = String(content.prefix(index + 1)) content = String(content.dropFirst(index + 1)) range = range.upperBound.. Date: Wed, 26 Sep 2018 03:10:53 +0200 Subject: [PATCH 2/2] Changelog entry --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5407f..2fe081b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Stencil Changelog +## Master + +### Bug Fixes + +- Fixed a bug in Stencil 0.13 where tags without spaces were incorrectly parsed. + [David Jennes](https://github.com/djbe) + [#252](https://github.com/stencilproject/Stencil/pull/252) + + ## 0.13.0 ### Breaking