Dan Ungureanu
1393950dbc
FIX: Improve HTML to Markdown conversion ( #9231 )
...
This commit ensures that whitespaces are preserved in <pre>, but removed
inside text paragraphs.
2020-03-18 19:31:10 +02:00
Sam Saffron
30990006a9
DEV: enable frozen string literal on all files
...
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.
Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Vinoth Kannan
87b53e170b
FIX: skip <br> inside <p> if next character is \n
2019-04-14 14:44:54 +05:30
Gerhard Schlager
577af81e76
FIX: Font tag resulted in wrong email trimming
2018-12-18 11:40:54 +01:00
Gerhard Schlager
37461a6398
FIX: Weird mixture of line breaks resulted in wrong email trimming
2018-12-18 11:40:54 +01:00
David Taylor
9248ad1905
DEV: Enable `Style/SingleLineMethods` and `Style/Semicolon` in Rubocop ( #6717 )
2018-12-04 11:48:13 +08:00
Régis Hanol
26d5ae61dd
FIX: handle <pre> inside <blockquote> in html_to_markdown
2018-02-26 23:28:02 +01:00
Vinoth Kannan
6b3aa81c11
FIX: Remove other whitespaces except the line intents
2017-12-09 02:36:27 +05:30
Vinoth Kannan
dcc63a8ead
FIX: Keep all the indenting in the text
2017-12-09 01:11:00 +05:30
Leo McArdle
0ef7a969f2
Some more HTML to Markdown fixes ( #5046 )
...
* FIX: handle spaces better within emphasis tags in html_to_markdown
* FIX: handle line breaks at beginning of emphasis tags in html_to_markdown
2017-08-14 22:13:24 +02:00
Leo McArdle
65d5cd7239
FIX: generate valid markdown from <br></b> in an email ( #5022 )
...
* FIX: generate valid markdown from <br></b> in an email
* FIX: don't generate markdown for empty <strong> or <em> tags in emails
2017-08-02 23:02:59 +02:00
Guo Xiang Tan
5012d46cbd
Add rubocop to our build. ( #5004 )
2017-07-28 10:20:09 +09:00
Régis Hanol
a1b8a3b52b
FIX: supports bare <li> when converting html to markdown
2017-05-17 15:05:11 +02:00
Robin Ward
b57b635d30
FIX: Extract `div` tags within `span`s
2017-05-09 12:33:54 -04:00
Régis Hanol
768c63c103
Add 'keep_cid_imgs' option to HTML to Markdown converter to improve incoming email parsing
2017-05-03 23:01:55 +02:00
Régis Hanol
e38014772b
FIX: skip hidden <img> (no tracking for you)
2017-05-03 19:40:34 +02:00
Régis Hanol
c8044c6956
FIX: skip hidden nodes when converting from HTML to Markdown
2017-05-03 19:34:03 +02:00
Régis Hanol
bff36de130
FIX: HtmlToMarkdown should not convert empty/bad <img> tags
2017-05-03 18:29:25 +02:00
Régis Hanol
c880af8120
FIX: properly trim whitespaces (including those pesky html entities)
2017-05-03 18:04:31 +02:00
Régis Hanol
edbf12622b
FIX: HtmlToMarkdown should not convert empty/bad <a> tags
2017-05-03 16:42:37 +02:00
Régis Hanol
aba76bace6
add support to keep img tags when converting to html
2017-04-28 22:14:46 +02:00
Régis Hanol
51ee49aad2
FIX: properly support HTML document when converting to markdown
2017-04-28 22:02:20 +02:00
Régis Hanol
b76674f640
FEATURE: convert incoming emails in HTML to markdown
...
- remove incoming_email_prefer_html site setting
- remove HtmlCleaner class
2017-04-26 16:49:06 +02:00
Régis Hanol
e5c29a1dde
eradicate debugging 'puts' 💥
2017-04-24 23:08:15 +02:00
Régis Hanol
d5630d6160
HtmlToMarkdown library
...
Small library to transform HTML to Discourse-flavored markdown (mostly used for imports)
2017-04-24 22:01:41 +02:00