File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
commonmark/testdata/GoldenFiles Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,10 @@ var characterEntityReplacer = strings.NewReplacer(
103103 // care about fewer characters
104104 "<" , "<" ,
105105 ">" , ">" ,
106- "&" , "&" ,
106+
107+ // Note: We are not escaping "&" as "&" anymore.
108+ // In most cases the "&" is completely fine.
109+ // https://github.com/JohannesKaufmann/html-to-markdown/issues/178
107110)
108111
109112func (b * base ) handleTextTransform (ctx converter.Context , content string ) string {
Original file line number Diff line number Diff line change @@ -266,11 +266,11 @@ before[**already bold**](/)after
266266
267267before** [ middle] ( / ) ** after
268268
269- before** [ * inside bold & ; italic* ] ( / ) ** after
269+ before** [ * inside bold & italic* ] ( / ) ** after
270270
271- before*** [ inside bold & ; italic] ( / ) a* b** after
271+ before*** [ inside bold & italic] ( / ) a* b** after
272272
273- before** [ inside bold & ; italic] ( / ) ** after
273+ before** [ inside bold & italic] ( / ) ** after
274274
275275before** a* b[ c] ( / ) d* e** after
276276
Original file line number Diff line number Diff line change 1010
11112 > ; 1
12121 < ; 2
13- A & ; B
14- A & ; B
15- & ; ouml;
13+ A & B
14+ A & B
15+ ö ;
1616
1717\* not emphasized*
1818< ; br/> ; not a tag
@@ -22,7 +22,7 @@ A & B
2222\* not a list
2323\# not a heading
2424\[ foo] : /url "not a reference"
25- & ; ouml; not a character entity
25+ ö ; not a character entity
2626
2727Start Line
2828
You can’t perform that action at this time.
0 commit comments