Added sample output to readme.
Jay Taylor
9 years ago
22 | 22 | package main |
23 | 23 | |
24 | 24 | import ( |
25 | "log" | |
25 | "fmt" | |
26 | 26 | |
27 | 27 | "github.com/jaytaylor/html2text" |
28 | 28 | ) |
46 | 46 | if err != nil { |
47 | 47 | panic(err) |
48 | 48 | } |
49 | log.Printf("input: %s\n\noutput: %s\n", inputHtml, text) | |
49 | fmt.Printf("input:\n\n%s\n\noutput:\n\n%s\n", inputHtml, text) | |
50 | 50 | } |
51 | ``` | |
52 | ||
53 | Output: | |
54 | ``` | |
55 | input: | |
56 | ||
57 | <div class="hard-to-read"> | |
58 | Welcome to your new account on my service! | |
59 | </div> | |
60 | ||
61 | <p> | |
62 | Here is some more information: | |
63 | ||
64 | <ul> | |
65 | <li>Link 1: <a href="https://example.com">Example.com</a></li> | |
66 | <li>Link 2: <a href="https://example.com">Example.com</a></li> | |
67 | <li>Something else</li> | |
68 | </ul> | |
69 | </p> | |
70 | ||
71 | output: | |
72 | ||
73 | Welcome to your new account on my service! | |
74 | ||
75 | Here is some more information: | |
76 | ||
77 | Link 1: | |
78 | https://example.com | |
79 | ||
80 | Link 2: | |
81 | https://example.com | |
82 | ||
83 | Something else | |
51 | 84 | ``` |
52 | 85 | |
53 | 86 |