From c35d0545c647b21010c39413fcc031e1dd843c5d Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 5 Nov 2019 22:33:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA.net=202.0.5?= =?UTF-8?q?=E7=9A=84=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MarkdownSharp.cs | 250 ++++++++++++++++++++++++----------------------- 1 file changed, 130 insertions(+), 120 deletions(-) diff --git a/MarkdownSharp.cs b/MarkdownSharp.cs index f058945..1d951a4 100644 --- a/MarkdownSharp.cs +++ b/MarkdownSharp.cs @@ -2,25 +2,25 @@ * MarkdownSharp * ------------- * a C# Markdown processor - * + * * Markdown is a text-to-HTML conversion tool for web writers * Copyright (c) 2004 John Gruber * http://daringfireball.net/projects/markdown/ - * + * * Markdown.NET * Copyright (c) 2004-2009 Milan Negovan * http://www.aspnetresources.com * http://aspnetresources.com/blog/markdown_announced.aspx - * + * * MarkdownSharp * Copyright (c) 2009-2011 Jeff Atwood * http://stackoverflow.com * http://www.codinghorror.com/blog/ * http://code.google.com/p/markdownsharp/ - * + * * History: Milan ported the Markdown processor to C#. He granted license to me so I can open source it * and let the community contribute to and improve MarkdownSharp. - * + * */ #region Copyright and license @@ -30,7 +30,7 @@ Copyright (c) 2009 - 2010 Jeff Atwood http://www.opensource.org/licenses/mit-license.php - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -50,7 +50,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Copyright (c) 2003-2004 John Gruber - + All rights reserved. Redistribution and use in source and binary forms, with or without @@ -95,40 +95,46 @@ namespace MarkdownSharp public class MarkdownOptions { /// - /// when true, (most) bare plain URLs are auto-hyperlinked + /// when true, (most) bare plain URLs are auto-hyperlinked /// WARNING: this is a significant deviation from the markdown spec /// - public bool AutoHyperlink { get; set; } + private bool _AutoHyperlink; + public bool AutoHyperlink { get{return this._AutoHyperlink;} set{this._AutoHyperlink = value;} } /// - /// when true, RETURN becomes a literal newline + /// when true, RETURN becomes a literal newline /// WARNING: this is a significant deviation from the markdown spec /// - public bool AutoNewlines { get; set; } + private bool _AutoNewlines; + public bool AutoNewlines { get{return this._AutoNewlines;} set{this._AutoNewlines = value;} } /// /// use ">" for HTML output, or " />" for XHTML output /// - public string EmptyElementSuffix { get; set; } + private string _EmptyElementSuffix; + public string EmptyElementSuffix { get{return this._EmptyElementSuffix;} set{this._EmptyElementSuffix = value;} } /// - /// when true, problematic URL characters like [, ], (, and so forth will be encoded + /// when true, problematic URL characters like [, ], (, and so forth will be encoded /// WARNING: this is a significant deviation from the markdown spec /// - public bool EncodeProblemUrlCharacters { get; set; } + private bool _EncodeProblemUrlCharacters; + public bool EncodeProblemUrlCharacters { get{return this._EncodeProblemUrlCharacters;} set{this._EncodeProblemUrlCharacters = value;} } /// - /// when false, email addresses will never be auto-linked + /// when false, email addresses will never be auto-linked /// WARNING: this is a significant deviation from the markdown spec /// - public bool LinkEmails { get; set; } + private bool _LinkEmails; + public bool LinkEmails { get{return this._LinkEmails;} set{this._LinkEmails = value;} } /// - /// when true, bold and italic require non-word characters on either side + /// when true, bold and italic require non-word characters on either side /// WARNING: this is a significant deviation from the markdown spec /// - public bool StrictBoldItalic { get; set; } + private bool _StrictBoldItalic; + public bool StrictBoldItalic { get{return this._StrictBoldItalic;} set{this._StrictBoldItalic = value;} } } /// - /// Markdown is a text-to-HTML conversion tool for web writers. - /// Markdown allows you to write using an easy-to-read, easy-to-write plain text format, + /// Markdown is a text-to-HTML conversion tool for web writers. + /// Markdown allows you to write using an easy-to-read, easy-to-write plain text format, /// then convert it to structurally valid XHTML (or HTML). /// public class Markdown @@ -148,20 +154,20 @@ public Markdown() /// /// Create a new Markdown instance and optionally load options from a configuration /// file. There they should be stored in the appSettings section, available options are: - /// + /// /// Markdown.StrictBoldItalic (true/false) /// Markdown.EmptyElementSuffix (">" or " />" without the quotes) /// Markdown.LinkEmails (true/false) /// Markdown.AutoNewLines (true/false) /// Markdown.AutoHyperlink (true/false) - /// Markdown.EncodeProblemUrlCharacters (true/false) - /// + /// Markdown.EncodeProblemUrlCharacters (true/false) + /// /// public Markdown(bool loadOptionsFromConfigFile) { if (!loadOptionsFromConfigFile) return; - var settings = ConfigurationManager.AppSettings; + System.Collections.Specialized.NameValueCollection settings = ConfigurationManager.AppSettings; foreach (string key in settings.Keys) { switch (key) @@ -213,7 +219,7 @@ public string EmptyElementSuffix private string _emptyElementSuffix = " />"; /// - /// when false, email addresses will never be auto-linked + /// when false, email addresses will never be auto-linked /// WARNING: this is a significant deviation from the markdown spec /// public bool LinkEmails @@ -224,7 +230,7 @@ public bool LinkEmails private bool _linkEmails = true; /// - /// when true, bold and italic require non-word characters on either side + /// when true, bold and italic require non-word characters on either side /// WARNING: this is a significant deviation from the markdown spec /// public bool StrictBoldItalic @@ -235,7 +241,7 @@ public bool StrictBoldItalic private bool _strictBoldItalic = false; /// - /// when true, RETURN becomes a literal newline + /// when true, RETURN becomes a literal newline /// WARNING: this is a significant deviation from the markdown spec /// public bool AutoNewLines @@ -246,7 +252,7 @@ public bool AutoNewLines private bool _autoNewlines = false; /// - /// when true, (most) bare plain URLs are auto-hyperlinked + /// when true, (most) bare plain URLs are auto-hyperlinked /// WARNING: this is a significant deviation from the markdown spec /// public bool AutoHyperlink @@ -257,7 +263,7 @@ public bool AutoHyperlink private bool _autoHyperlink = false; /// - /// when true, problematic URL characters like [, ], (, and so forth will be encoded + /// when true, problematic URL characters like [, ], (, and so forth will be encoded /// WARNING: this is a significant deviation from the markdown spec /// public bool EncodeProblemUrlCharacters @@ -288,8 +294,8 @@ public Token(TokenType type, string value) private const int _nestDepth = 6; /// - /// Tabs are automatically converted to spaces as part of the transform - /// this constant determines how "wide" those tabs become in spaces + /// Tabs are automatically converted to spaces as part of the transform + /// this constant determines how "wide" those tabs become in spaces /// private const int _tabWidth = 4; @@ -323,7 +329,7 @@ static Markdown() foreach (char c in @"\`*_{}[]()>#+-.!/") { string key = c.ToString(); - string hash = GetHashKey(key, isHtmlBlock: false); + string hash = GetHashKey(key, false); _escapeTable.Add(key, hash); _invertedEscapeTable.Add(hash, key); _backslashEscapeTable.Add(@"\" + key, hash); @@ -334,7 +340,7 @@ static Markdown() } /// - /// current version of MarkdownSharp; + /// current version of MarkdownSharp; /// see http://code.google.com/p/markdownsharp/ for the latest code or to contribute /// public string Version @@ -343,7 +349,7 @@ public string Version } /// - /// Transforms the provided Markdown-formatted text to HTML; + /// Transforms the provided Markdown-formatted text to HTML; /// see http://en.wikipedia.org/wiki/Markdown /// /// @@ -370,11 +376,11 @@ public string Transform(string text) return text + "\n"; } - + private string RunBlockGamut(string text){return RunBlockGamut(text, true);} /// /// Perform transformations that form block-level tags like paragraphs, headers, and list items. /// - private string RunBlockGamut(string text, bool unhash = true) + private string RunBlockGamut(string text, bool unhash) { text = DoHeaders(text); text = DoHorizontalRules(text); @@ -389,7 +395,7 @@ private string RunBlockGamut(string text, bool unhash = true) //

tags around block-level tags. text = HashHTMLBlocks(text); - text = FormParagraphs(text, unhash: unhash); + text = FormParagraphs(text, unhash); return text; } @@ -427,11 +433,12 @@ private string RunSpanGamut(string text) private static Regex _htmlBlockHash = new Regex("\x1AH\\d+H", RegexOptions.Compiled); + private string FormParagraphs(string text){return FormParagraphs(text, true);} ///

- /// splits on two or more newlines, to form "paragraphs"; + /// splits on two or more newlines, to form "paragraphs"; /// each paragraph is then unhashed (if it is a hash and unhashing isn't turned off) or wrapped in HTML p tag /// - private string FormParagraphs(string text, bool unhash = true) + private string FormParagraphs(string text, bool unhash) { // split on two or more newlines string[] grafs = _newlinesMultiple.Split(_newlinesLeadingTrailing.Replace(text, "")); @@ -463,7 +470,7 @@ private string FormParagraphs(string text, bool unhash = true) while (keepGoing && sanityCheck > 0) { keepGoing = false; - grafs[i] = _htmlBlockHash.Replace(grafs[i], match => + grafs[i] = _htmlBlockHash.Replace(grafs[i], delegate(Match match) { keepGoing = true; return _htmlBlocks[match.Value]; @@ -509,7 +516,7 @@ private void Cleanup() private static string _nestedBracketsPattern; /// - /// Reusable pattern to match balanced [brackets]. See Friedl's + /// Reusable pattern to match balanced [brackets]. See Friedl's /// "Mastering Regular Expressions", 2nd Ed., pp. 328-331. /// private static string GetNestedBracketsPattern() @@ -533,7 +540,7 @@ private static string GetNestedBracketsPattern() private static string _nestedParensPattern; /// - /// Reusable pattern to match balanced (parens). See Friedl's + /// Reusable pattern to match balanced (parens). See Friedl's /// "Mastering Regular Expressions", 2nd Ed., pp. 328-331. /// private static string GetNestedParensPattern() @@ -612,8 +619,8 @@ private static string GetBlockPattern() // hard-coded: // // * List "a" is made of tags which can be both inline or block-level. - // These will be treated block-level when the start tag is alone on - // its line, otherwise they're not matched here and will be taken as + // These will be treated block-level when the start tag is alone on + // its line, otherwise they're not matched here and will be taken as // inline later. // * List "b" is made of tags which are always block-level; // @@ -633,7 +640,7 @@ private static string GetBlockPattern() | '[^']*' # text inside single quotes (tolerate >) )* - )? + )? "; string content = RepeatString(@" @@ -650,7 +657,7 @@ private static string GetBlockPattern() RepeatString(@"  # closing nested tag ) - |    + |    <(?!/\2\s*> # other tags with a different name ) )*", _nestDepth); @@ -677,9 +684,9 @@ private static string GetBlockPattern() ) ( # save in $1 - # Match from `\n` to `\n`, handling nested tags + # Match from `\n` to `\n`, handling nested tags # in between. - + <($block_tags_b_re) # start tag = $2 $attr> # attributes followed by > and \n $content # content, support nesting @@ -695,19 +702,19 @@ [ ]* # trailing spaces # the matching end tag [ ]* # trailing spaces (?=\n+|\Z) # followed by a newline or end of document - - | # Special case just for
. It was easier to make a special + + | # Special case just for
. It was easier to make a special # case than to make the other regex more complicated. - + [ ]{0,$less_than_tab}
# the matching end tag [ ]* (?=\n{2,}|\Z) # followed by a blank line or end of document - + | # Special case for standalone HTML comments: - + (?<=\n\n|\A) # preceded by a blank line or start of document [ ]{0,$less_than_tab} (?s: @@ -715,9 +722,9 @@ [ ]* ) [ ]* (?=\n{2,}|\Z) # followed by a blank line or end of document - + | # PHP and ASP-style processor instructions (-]|-[^>])(?:[^-]|-[^-])*)-->)| # match (<\?.*?\?>)| # match " + - RepeatString(@" + RepeatString(@" (<[A-Za-z\/!$](?:[^<>]|", _nestDepth) + RepeatString(@")*>)", _nestDepth) + " # match and ", RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled); /// - /// returns an array of HTML tokens comprising the input string. Each token is - /// either a tag (possibly with nested, tags contained therein, such - /// as <a href="<MTFoo>">, or a run of text between tags. Each element of the - /// array is a two-element array; the first is either 'tag' or 'text'; the second is + /// returns an array of HTML tokens comprising the input string. Each token is + /// either a tag (possibly with nested, tags contained therein, such + /// as <a href="<MTFoo>">, or a run of text between tags. Each element of the + /// array is a two-element array; the first is either 'tag' or 'text'; the second is /// the actual value. /// private List TokenizeHTML(string text) { int pos = 0; int tagStart = 0; - var tokens = new List(); + List tokens = new List(); // this regex is derived from the _tokenize() subroutine in Brad Choate's MTRegex plugin. // http://www.bradchoate.com/past/mtregex.php @@ -848,9 +855,9 @@ [ ]* /// Turn Markdown link shortcuts into HTML anchor tags /// /// - /// [link text](url "title") - /// [link text][id] - /// [id] + /// [link text](url "title") + /// [link text][id] + /// [id] /// private string DoAnchors(string text) { @@ -949,7 +956,7 @@ private string AnchorInlineEvaluator(Match match) url = EncodeProblemUrlChars(url); url = EscapeBoldItalic(url); if (url.StartsWith("<") && url.EndsWith(">")) - url = url.Substring(1, url.Length - 2); // remove <>'s surrounding URL, if present + url = url.Substring(1, url.Length - 2); // remove <>'s surrounding URL, if present result = string.Format(" - /// Turn Markdown image shortcuts into HTML img tags. + /// Turn Markdown image shortcuts into HTML img tags. /// /// /// ![alt text][id] @@ -1024,7 +1031,7 @@ private string DoImages(string text) private string EscapeImageAltText(string s) { s = EscapeBoldItalic(s); - s = Regex.Replace(s, @"[\[\]()]", m => _escapeTable[m.ToString()]); + s = Regex.Replace(s, @"[\[\]()]", delegate(Match m) {return _escapeTable[m.ToString()];}); return s; } @@ -1072,7 +1079,7 @@ private string ImageTag(string url, string altText, string title) altText = EscapeImageAltText(AttributeEncode(altText)); url = EncodeProblemUrlChars(url); url = EscapeBoldItalic(url); - var result = string.Format("\"{1}\"", /// - /// Header 1 - /// ======== - /// - /// Header 2 - /// -------- - /// - /// # Header 1 - /// ## Header 2 - /// ## Header 2 with closing hashes ## - /// ... - /// ###### Header 6 + /// Header 1 + /// ======== + /// + /// Header 2 + /// -------- + /// + /// # Header 1 + /// ## Header 2 + /// ## Header 2 with closing hashes ## + /// ... + /// ###### Header 6 /// private string DoHeaders(string text) { @@ -1153,8 +1160,8 @@ [ ]* # Trailing spaces /// Turn Markdown horizontal rules into HTML hr tags /// /// - /// *** - /// * * * + /// *** + /// * * * /// --- /// - - - /// @@ -1189,10 +1196,11 @@ [ ]* private static Regex _listTopLevel = new Regex(@"(?:(?<=\n\n)|\A\n?)" + _wholeList, RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled); + private string DoLists(string text){return DoLists(text, false);} /// /// Turn Markdown lists into HTML ul and ol and li tags /// - private string DoLists(string text, bool isInsideParagraphlessListItem = false) + private string DoLists(string text, bool isInsideParagraphlessListItem) { // We use a different prefix before nested lists than top-level lists. // See extended comment in _ProcessListItems(). @@ -1204,9 +1212,10 @@ private string DoLists(string text, bool isInsideParagraphlessListItem = false) return text; } - private MatchEvaluator GetListEvaluator(bool isInsideParagraphlessListItem = false) + private MatchEvaluator GetListEvaluator(){return GetListEvaluator(false);} + private MatchEvaluator GetListEvaluator(bool isInsideParagraphlessListItem) { - return new MatchEvaluator(match => + return new MatchEvaluator(delegate(Match match) { string list = match.Groups[1].Value; string listType = Regex.IsMatch(match.Groups[3].Value, _markerUL) ? "ul" : "ol"; @@ -1219,11 +1228,12 @@ private MatchEvaluator GetListEvaluator(bool isInsideParagraphlessListItem = fal }); } + private string ProcessListItems(string list, string marker){return ProcessListItems(list, marker, false);} /// /// Process the contents of a single ordered or unordered list, splitting it /// into individual list items. /// - private string ProcessListItems(string list, string marker, bool isInsideParagraphlessListItem = false) + private string ProcessListItems(string list, string marker, bool isInsideParagraphlessListItem) { // The listLevel global keeps track of when we're inside a list. // Each time we enter a list, we increment it; when we leave a list, @@ -1255,13 +1265,13 @@ private string ProcessListItems(string list, string marker, bool isInsideParagra @"(^[ ]*) # leading whitespace = $1 ({0}) [ ]+ # list marker = $2 ((?s:.+?) # list item text = $3 - (\n+)) + (\n+)) (?= (\z | \1 ({0}) [ ]+))", marker); bool lastItemHadADoubleNewline = false; // has to be a closure, so subsequent invocations can share the bool - MatchEvaluator ListItemEvaluator = (Match match) => + MatchEvaluator ListItemEvaluator = delegate(Match match) { string item = match.Groups[3].Value; @@ -1270,11 +1280,11 @@ private string ProcessListItems(string list, string marker, bool isInsideParagra if (containsDoubleNewline || lastItemHadADoubleNewline) // we could correct any bad indentation here.. - item = RunBlockGamut(Outdent(item) + "\n", unhash: false); + item = RunBlockGamut(Outdent(item) + "\n", false); else { // recursion for sub-lists - item = DoLists(Outdent(item), isInsideParagraphlessListItem: true); + item = DoLists(Outdent(item), true); item = item.TrimEnd('\n'); if (!isInsideParagraphlessListItem) // only the outer-most item should run this, otherwise it's run multiple times for the inner ones item = RunSpanGamut(item); @@ -1372,7 +1382,7 @@ private string DoCodeSpans(string text) // // Turns to: // - // ... type `bar` ... + // ... type `bar` ... // return _codeSpan.Replace(text, new MatchEvaluator(CodeSpanEvaluator)); @@ -1464,7 +1474,7 @@ private string BlockQuoteEvaluator(Match match) bq = Regex.Replace(bq, @"(\s*
.+?
)", new MatchEvaluator(BlockQuoteEvaluator2), RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline); bq = string.Format("
\n{0}\n
", bq); - string key = GetHashKey(bq, isHtmlBlock: true); + string key = GetHashKey(bq, true); _htmlBlocks[key] = bq; return "\n\n" + key + "\n\n"; @@ -1493,11 +1503,11 @@ private static string handleTrailingParens(Match match) if (match.Groups[1].Success) return match.Value; - var protocol = match.Groups[2].Value; - var link = match.Groups[3].Value; + string protocol = match.Groups[2].Value; + string link = match.Groups[3].Value; if (!link.EndsWith(")")) return "<" + protocol + link + ">"; - var level = 0; + int level = 0; foreach (Match c in Regex.Matches(link, "[()]")) { if (c.Value == "(") @@ -1512,14 +1522,14 @@ private static string handleTrailingParens(Match match) level--; } } - var tail = ""; + string tail = ""; if (level < 0) { - link = Regex.Replace(link, @"\){1," + (-level) + "}$", m => { tail = m.Value; return ""; }); + link = Regex.Replace(link, @"\){1," + (-level) + "}$", delegate(Match m) { tail = m.Value; return ""; }); } if (tail.Length > 0) { - var lastChar = link[link.Length - 1]; + char lastChar = link[link.Length - 1]; if (!_endCharRegex.IsMatch(lastChar.ToString())) { tail = lastChar + tail; @@ -1593,7 +1603,7 @@ private string EmailEvaluator(Match match) // email = "mailto:" + email; - // leave ':' alone (to spot mailto: later) + // leave ':' alone (to spot mailto: later) email = EncodeEmailAddress(email); email = string.Format("
{0}", email); @@ -1619,14 +1629,14 @@ private string Outdent(string block) /// - /// encodes email address randomly - /// roughly 10% raw, 45% hex, 45% dec + /// encodes email address randomly + /// roughly 10% raw, 45% hex, 45% dec /// note that @ is always encoded and : never is /// private string EncodeEmailAddress(string addr) { - var sb = new StringBuilder(addr.Length * 5); - var rand = new Random(); + StringBuilder sb = new StringBuilder(addr.Length * 5); + Random rand = new Random(); int r; foreach (char c in addr) { @@ -1730,13 +1740,13 @@ private static string AttributeEncode(string s) private static readonly char[] _problemUrlChars = @"""'*()[]$:_".ToCharArray(); /// - /// hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems + /// hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems /// private string EncodeProblemUrlChars(string url) { if (!_encodeProblemUrlCharacters) return url; - var sb = new StringBuilder(url.Length); + StringBuilder sb = new StringBuilder(url.Length); bool encode; char c; @@ -1758,20 +1768,20 @@ private string EncodeProblemUrlChars(string url) /// - /// Within tags -- meaning between < and > -- encode [\ ` * _] so they - /// don't conflict with their use in Markdown for code, italics and strong. - /// We're replacing each such character with its corresponding hash - /// value; this is likely overkill, but it should prevent us from colliding + /// Within tags -- meaning between < and > -- encode [\ ` * _] so they + /// don't conflict with their use in Markdown for code, italics and strong. + /// We're replacing each such character with its corresponding hash + /// value; this is likely overkill, but it should prevent us from colliding /// with the escape values by accident. /// private string EscapeSpecialCharsWithinTagAttributes(string text) { - var tokens = TokenizeHTML(text); + List tokens = TokenizeHTML(text); // now, rebuild text from the tokens - var sb = new StringBuilder(text.Length); + StringBuilder sb = new StringBuilder(text.Length); - foreach (var token in tokens) + foreach (Token token in tokens) { string value = token.Value; @@ -1793,15 +1803,15 @@ private string EscapeSpecialCharsWithinTagAttributes(string text) } /// - /// convert all tabs to _tabWidth spaces; - /// standardizes line endings from DOS (CR LF) or Mac (CR) to UNIX (LF); - /// makes sure text ends with a couple of newlines; + /// convert all tabs to _tabWidth spaces; + /// standardizes line endings from DOS (CR LF) or Mac (CR) to UNIX (LF); + /// makes sure text ends with a couple of newlines; /// removes any blank lines (only spaces) in the text /// private string Normalize(string text) { - var output = new StringBuilder(text.Length); - var line = new StringBuilder(); + StringBuilder output = new StringBuilder(text.Length); + StringBuilder line = new StringBuilder(); bool valid = false; for (int i = 0; i < text.Length; i++) @@ -1849,7 +1859,7 @@ private string Normalize(string text) /// private static string RepeatString(string text, int count) { - var sb = new StringBuilder(text.Length * count); + StringBuilder sb = new StringBuilder(text.Length * count); for (int i = 0; i < count; i++) sb.Append(text); return sb.ToString(); From 6e7da06436c32001c63cfaef433985832010558e Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 5 Nov 2019 22:37:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e29ec46..f279b21 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ MarkdownSharp - With Github style code blocks ========================================= +新建2.0.5分支,修改为兼容.net版本2.0.5的语法。 +========================================= The original MarkdownSharp can be found on google code here [https://code.google.com/p/markdownsharp/](https://code.google.com/p/markdownsharp/) @@ -34,10 +36,10 @@ Then you can use a library like [HighlightJS](http://highlightjs.org/) to sytnax Whatever is after the 3 ticks will be put in the class name -so +so
```mylanguage
-
-would transform to + +would transform to ```html

 ```