Guest User

Markdown in .NET

a guest
Feb 26th, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. pattern = string.Format(@"
  2. (?:
  3. (?<=nn) # Starting after a blank line
  4. | # or
  5. An? # the beginning of the doc
  6. )
  7. ( # save in $1
  8. [ ]{{0, {0}}}
  9. <(hr) # start tag = $2
  10. b # word break
  11. ([^<>])*? #
  12. /?> # the matching end tag
  13. [ t]*
  14. (?=n{{2,}}|Z) # followed by a blank line or end of document
  15. )", tabWidth - 1);
  16. text = Regex.Replace(text, pattern, new MatchEvaluator(HtmlEvaluator), RegexOptions.IgnorePatternWhitespace);
Add Comment
Please, Sign In to add comment