From adbac79f19dd9c09d05c33ebc024f861d34fe4aa Mon Sep 17 00:00:00 2001 From: Tim Maes Date: Mon, 20 Dec 2021 09:32:16 +0100 Subject: [PATCH 1/2] Prevent EOF to break output block --- T4Editor/Common/Constants.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/T4Editor/Common/Constants.cs b/T4Editor/Common/Constants.cs index f1acf32..689642b 100644 --- a/T4Editor/Common/Constants.cs +++ b/T4Editor/Common/Constants.cs @@ -4,8 +4,8 @@ internal static class Constants { #region RegularExpressions - internal const string StatementBlockRegex = "(?)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(?=\\s?|\\w?|\n?)(?(?!\")"; - internal const string OutputBlockRegex = "(?<=#>)(((?!<#(?!\\+|\\=|\")|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(?=\\s|\\w|\\n?))(?=<#)"; + internal const string StatementBlockRegex = "(?)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(?=\\s?|\\w?|\\n?)(?(?!\")"; + internal const string OutputBlockRegex = "(?<=#>)(((?!<#(?!\\+|\\=|\")|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(?=\\s|\\w|\\n?))(?=(<#)|$(?![\\r\\n]))"; internal const string ClassFeatureBlockRegex = "<#\\+((?!<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(?=\\s|\\w|\\n?)#>"; internal const string DirectiveRegex = "(?<=<#@)((?!<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(?=\\s|\\w|\\n?)(?=#>)"; internal const string ExpressionBlockRegex = "<#=((?!<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~\\u2000-\\u206F\\u2E00-\\u2E7F])*(\\s?)#>"; From 9d7afe08b142b254946bacd93b4c54016d483d1f Mon Sep 17 00:00:00 2001 From: Tim Maes Date: Mon, 20 Dec 2021 09:34:15 +0100 Subject: [PATCH 2/2] Bump version number --- T4Editor/source.extension.vsixmanifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/T4Editor/source.extension.vsixmanifest b/T4Editor/source.extension.vsixmanifest index cdb7366..3760c74 100644 --- a/T4Editor/source.extension.vsixmanifest +++ b/T4Editor/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + T4Editor Configurable colored editor for *.tt, *.t4 and *.ttinclude files with code completion, outlining and brace matching. http://www.github.com/Tim-Maes/T4Editor