Browse Source

implement escape rules in StringParser

pull/27/merge
Siegfried Pammer 14 years ago
parent
commit
02449aa2b7
  1. 12
      src/Main/Core/Project/Src/Services/StringParser/StringParser.cs

12
src/Main/Core/Project/Src/Services/StringParser/StringParser.cs

@ -38,6 +38,16 @@ namespace ICSharpCode.Core @@ -38,6 +38,16 @@ namespace ICSharpCode.Core
return dict;
}
/// <summary>
/// Escapes all occurrences of '${' to '${$}{'.
/// </summary>
public static string Escape(string input)
{
if (input == null)
throw new ArgumentNullException("input");
return input.Replace("${", "${$}{");
}
/// <summary>
/// Expands ${xyz} style property values.
/// </summary>
@ -153,6 +163,8 @@ namespace ICSharpCode.Core @@ -153,6 +163,8 @@ namespace ICSharpCode.Core
{
if (propertyName == null)
throw new ArgumentNullException("propertyName");
if (propertyName == "$")
return "$";
if (customTags != null) {
foreach (StringTagPair pair in customTags) {

Loading…
Cancel
Save