diff --git a/shell/Markdown.VT/ColorCode.VT/Parser/Bash.cs b/shell/Markdown.VT/ColorCode.VT/Parser/Bash.cs index d2719050..16cd9b19 100644 --- a/shell/Markdown.VT/ColorCode.VT/Parser/Bash.cs +++ b/shell/Markdown.VT/ColorCode.VT/Parser/Bash.cs @@ -24,6 +24,20 @@ public class Bash : ILanguage {1, BashCommentScope} }), + new LanguageRule( + @"'[^\n]*?'", + new Dictionary + { + {0, ScopeName.String} + }), + + new LanguageRule( + @"""[^\n]*?(? + { + {0, ScopeName.String} + }), + // match the first word of a line in a multi-line string as the command name. new LanguageRule( @"(?m)^\s*(\w+)", diff --git a/shell/Markdown.VT/ColorCode.VT/Parser/PowerShell.cs b/shell/Markdown.VT/ColorCode.VT/Parser/PowerShell.cs index c6f756ee..ff5ad5f4 100644 --- a/shell/Markdown.VT/ColorCode.VT/Parser/PowerShell.cs +++ b/shell/Markdown.VT/ColorCode.VT/Parser/PowerShell.cs @@ -48,7 +48,7 @@ public IList Rules }), new LanguageRule( - @"'[^\n]*?(? { {0, ScopeName.String} @@ -62,7 +62,7 @@ public IList Rules }), new LanguageRule( - @"(?s)(""[^\n]*?(? { {0, ScopeName.String}