|
Hello, I am upgrading SmartFormat to 3.2.1 from 2.7.2 and I am running into an issue adding a custom selector char. This is for replacing values in an XML, where the replacement key uses the $ sign to indicate the text that will get replaced. In 2.7.2 I have code that looks like this, In 3.2.1, I have modified the code to use the new AddCustomSelectorChars, so the code looks as follows, Is there away to get this to work in 3.2.1? |
Answered by
axunonb
Mar 23, 2023
Replies: 1 comment
|
This does not work: Smart.Default.Settings.Parser.AddCustomSelectorChars(" $".ToCharArray());As pointed out in the Wiki, changes to settings after the instances are created won't be processed. But this is what happens when calling This works: Console.WriteLine(Smart.CreateDefaultSmartFormat(Smart.Default.Settings).Format(format, templateData)); |
0 replies
Answer selected by
axunonb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This does not work:
As pointed out in the Wiki, changes to settings after the instances are created won't be processed. But this is what happens when calling
Smart.Default: it creates defaultSmartSettings.This works: