Skip to content

Commit

Permalink
Merge pull request #3 from Tim-Maes/feature/unicode-support
Browse files Browse the repository at this point in the history
Add support for unicode characters in code block filters
  • Loading branch information
Tim-Maes authored Dec 17, 2021
2 parents 84679b1 + 41531c5 commit 7682d6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions T4Editor/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ internal static class Constants
{
#region RegularExpressions

internal const string StatementBlockRegex = "(?<!\")<#((?!\"|=|@|\\+))((?!(?!)<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~])*(?=\\s?|\\w?|\n?)(?<!\")#>(?!\")";
internal const string OutputBlockRegex = "(?<=#>)(((?!<#(?!\\+|\\=|\")|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~])*(?=\\s|\\w|\\n?))(?=<#)";
internal const string ClassFeatureBlockRegex = "<#\\+((?!<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~])*(?=\\s|\\w|\\n?)#>";
internal const string DirectiveRegex = "(?<=<#@)((?!<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~])*(?=\\s|\\w|\\n?)(?=#>)";
internal const string ExpressionBlockRegex = "<#=((?!<#(?!\\+|\\=)|#>)[\\s|\\w|\\d|\n|().,<>\\-:;@#$%^&=*\\[\\]\"'+\\/\\\\®°⁰!?{}|`~])*(\\s?)#>";
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 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?)#>";

#endregion

Expand Down
2 changes: 1 addition & 1 deletion T4Editor/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="T4Editor.abda42ab-5257-4c25-b35a-39b39709332b" Version="2.0.2" Language="en-US" Publisher="Tim Maes" />
<Identity Id="T4Editor.abda42ab-5257-4c25-b35a-39b39709332b" Version="2.1" Language="en-US" Publisher="Tim Maes" />
<DisplayName>T4Editor</DisplayName>
<Description xml:space="preserve">Configurable colored editor for *.tt, *.t4 and *.ttinclude files with code completion, outlining and brace matching. </Description>
<MoreInfo>http://www.github.com/Tim-Maes/T4Editor</MoreInfo>
Expand Down

0 comments on commit 7682d6c

Please sign in to comment.