public static ExpandTemplate ( string articleText, string articleTitle, string>.Dictionary |
||
articleText | string | The text of the article |
articleTitle | string | The title of the article |
regexes | string>.Dictionary | Dictionary of templates to substitute |
includeComment | bool | |
Résultat | string |
public string SubstituteTemplates(string ArticleText, string ArticleTitle) { if (Regexes.Count == 0) { return(ArticleText); // nothing to substitute } if (chkIgnoreUnformatted.Checked) { ArticleText = RemoveUnformatted.HideUnformatted(ArticleText); } if (!chkUseExpandTemplates.Checked) { foreach (KeyValuePair <Regex, string> p in Regexes) { ArticleText = p.Key.Replace(ArticleText, p.Value); } } else { ArticleText = Tools.ExpandTemplate(ArticleText, ArticleTitle, Regexes, chkIncludeComment.Checked); } if (chkIgnoreUnformatted.Checked) { ArticleText = RemoveUnformatted.AddBackUnformatted(ArticleText); } return(ArticleText); }