diff options
| author | Tong Sun <[email protected]> | 2020-08-09 11:42:51 -0400 |
|---|---|---|
| committer | Tong Sun <[email protected]> | 2020-08-09 11:42:51 -0400 |
| commit | 19ead5b3f9722a404244a5f93050ccfc17bb08c2 (patch) | |
| tree | 68fc51c689e4f40577bd8fa9f7ec872f7048825b /README.md | |
| parent | - [*] refactor out handleOptions() & handlePlugins() to reduce cyclomatic com... (diff) | |
| download | html2md-19ead5b3f9722a404244a5f93050ccfc17bb08c2.tar.xz html2md-19ead5b3f9722a404244a5f93050ccfc17bb08c2.zip | |
- [+] add TableCompat plugin; enable Table
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 37 |
1 files changed, 36 insertions, 1 deletions
@@ -13,6 +13,7 @@ - [Simplest form](#simplest-form) - [Using goquery](#using-goquery) - [The options and plugins](#the-options-and-plugins) + - [Testing the new table plugins](#testing-the-new-table-plugins) - [Debian package](#debian-package) - [Install Source](#install-source) - [Credits](#credits) @@ -32,7 +33,7 @@ to convert HTML into Markdown, which is using an [HTML Parser](https://github.co ### $ html2md ```sh HTML to Markdown -Version 0.1.01 built on 2020-07-26 +Version 0.2.01 built on 2020-08-08 Copyright (C) 2020, Tong Sun HTML to Markdown converter on command line @@ -64,6 +65,7 @@ Options: -G, --plugin-gfm Plugin GitHubFlavored -S, --plugin-strikethrough Plugin Strikethrough -T, --plugin-table Plugin Table + --plugin-table-compat Plugin TableCompat -L, --plugin-task-list Plugin TaskListItems -V, --plugin-vimeo Plugin VimeoEmbed -Y, --plugin-youtube Plugin YoutubeEmbed @@ -109,6 +111,39 @@ $ echo 'Only <del>blue ones</del> <s> left</s>' | html2md -i --plugin-strikethro Only ~blue ones~ ~left~ ``` +## Testing the new table plugins + +```sh +$ cat $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/input.html | html2md -i -T | head -6 +| Firstname | Lastname | Age | +| --- | --- | --- | +| Jill | Smith | 50 | +| Eve | Jackson | 94 | +| Empty | | | +| End | + +$ cat $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/input.html | html2md -i -T --domain example.com | diff -wU 1 $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/output.table.golden - +--- +@@ -41 +41,2 @@ + | `var` | b | c | +\ No newline at end of file ++ + +$ cat $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/input.html | html2md -i --plugin-table-compat | head -6 +Firstname · Lastname · Age + +Jill · Smith · 50 + +Eve · Jackson · 94 + +$ cat $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/input.html | html2md -i --plugin-table-compat --domain example.com | diff -wU 1 $GOPATH/src/github.com/JohannesKaufmann/html-to-markdown/testdata/TestPlugins/table/output.tablecompat.golden - +--- +@@ -41 +41,2 @@ + `var` · b · c +\ No newline at end of file ++ +``` + # Debian package Will be available once `github.com/JohannesKaufmann/html-to-markdown` has a release version. |