You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ReverseMarkdown is a Html to Markdown (http://daringfireball.net/projects/markdown/syntax) converter library in C#. Conversion is very reliable since HtmlAgilityPack (HAP) library is used for traversing the Html DOM.
6
13
14
+
Note that the library implementation is based on the Ruby based Html to Markdown converter [ xijo/reverse_markdown](https://github.com/xijo/reverse_markdown).
15
+
7
16
## Usage
8
17
9
18
Install the package from NuGet using `Install-Package ReverseMarkdown` or clone the repository and built it yourself.
@@ -70,10 +79,11 @@ var converter = new ReverseMarkdown.Converter(config);
70
79
*`UnknownTagsOption.Drop` - Drop the unknown tag and its content
71
80
*`UnknownTagsOption.Bypass` - Ignore the unknown tag but try to convert its content
72
81
*`UnknownTagsOption.Raise` - Raise an error to let you know
82
+
*`PassThroughTags` - Pass a list of tags to pass through as-is without any processing.
73
83
*`WhitelistUriSchemes` - Specify which schemes (without trailing colon) are to be allowed for `<a>` and `<img>` tags. Others will be bypassed (output text or nothing). By default allows everything.
74
84
75
85
If `string.Empty` provided and when `href` or `src` schema couldn't be determined - whitelists
76
-
86
+
77
87
Schema is determined by `Uri` class, with exception when url begins with `/` (file schema) and `//` (http schema)
78
88
*`TableWithoutHeaderRowHandling` - handle table without header rows
79
89
*`TableWithoutHeaderRowHandlingOption.Default` - First row will be used as header row (default)
@@ -87,9 +97,6 @@ var converter = new ReverseMarkdown.Converter(config);
87
97
* Can deal with nested lists
88
98
* Github Flavoured Markdown conversion supported for br, pre and table. Use `var config = new ReverseMarkdown.Config(githubFlavoured:true);`. By default table will always be converted to Github flavored markdown immaterial of this flag.
89
99
90
-
## Acknowledgement
91
-
The library implementation is based on the Ruby based Html to Markdown converter [xijo/reverse_markdown](https://github.com/xijo/reverse_markdown).
0 commit comments