Hi @vsch
I'm now trying to replace links in html snippets, too. When I use html.setChars
and then format it back to markdown, the newline that separates the block from the next and indentation is lost. For example the initial markdown is:
line 1
<img src="i.jpg">
line 2
Then I change HtmlBlock
nodes trivially by setting the same content like this:
HtmlBlock b = …
b.setChars(b.getChars)
or
HtmlBlock b = …
b.setContent(b.getChars, Arrays.asList(b.getChars))
(I also tried some other variants) When then formatting the ast back to markdown, the html block is not separated by newline as before. Also the indentation is lost.
line1
<img src="i.jpg">
line 2
Is this expected? Or am I using the api not correctly maybe? Or are in markdown terms both variants equivalent?
Thanks in advance!
Kind regards
Eike
- solved #4
- replies 7
- views 8.3K
- likes 0