public string Content()
{
// Replace "more" comment with marker <span>.
var content = RawContent.Replace(READ_MORE_COMMENT, READ_MORE_HTML_MARKER);
// HTML encode anything in <pre> tags
// TODO: Preprocess this instead of doing it every time? Implement preprocessing once moved to Markdown
content = _preTag.Replace(content, match =>
{
// If "escaped=true" found then just return it as-is
if (match.Groups["attributes"].Value.Contains(ESCAPED_PRE_ATTRIBUTE))
return match.Value.Replace(ESCAPED_PRE_ATTRIBUTE, "");
return "<pre" + match.Groups["attributes"] + ">" + HtmlEncoder.Default.Encode(match.Groups["content"].Value) + "</pre>";
});
return content;
}