This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch delivery in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/delivery by this push: new 2eb467f10c Fix HCL Lexer heredoc error on trailing space. 2eb467f10c is described below commit 2eb467f10ce624d5900781234ab87eac59a21bc5 Author: Laszlo Kishalmi <laszlo.kisha...@gmail.com> AuthorDate: Tue Apr 18 15:24:11 2023 -0700 Fix HCL Lexer heredoc error on trailing space. --- .../org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java b/ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java index 9773e53472..ebbdc65555 100644 --- a/ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java +++ b/ide/languages.hcl/src/org/netbeans/modules/languages/hcl/HCLHereDocAdaptor.java @@ -51,14 +51,14 @@ public abstract class HCLHereDocAdaptor extends Lexer { protected boolean heredocEndAhead(String partialHeredoc) { int n = 1; int c = _input.LA(1); + // NewLines are part of heredoc content, but + // heredoc marker and it's leading space are not + while (Character.isWhitespace(c) && c != '\n') { + c = _input.LA(++n); + } if (c == '\n') { - //NewLines are part of heredoc content return false; } - // heredoc marker and it's leading space are not part of the heredoc content - while (Character.isWhitespace(c)) { - c = _input.LA(++n); - } for (int v = 0; v < currentHereDocVar.length(); v++) { if (this._input.LA(n + v) != currentHereDocVar.charAt(v)) { return false; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists