Docsify: Markdown for images isn't playing well with HTML anymore

Created on 31 Oct 2018  路  5Comments  路  Source: docsifyjs/docsify

If you use the image markdown syntax to render an image and put it near HTML code, Docsify will render it as text. The problem was introduced in version 4.8.0.

For example, this would not render the image:

<div>
![](img.png)
</div>

This would also not render the image:

<br/>
![](img.png)

But this would (empty line between HTML and markdown):

<br/>

![](img.png)

Most helpful comment

I found this can be rendered by adding spaces in html...

https://codesandbox.io/s/z2k36lqlrp

# Quick start

<div style='color: red;'>

- a
- b
- c

</div>

All 5 comments

Found out this https://github.com/markedjs/marked/issues/488#issuecomment-56338123.


鈫揟he same on GitHub.

<div>
  ![Docsify logo](https://docsify.js.org/_media/icon.svg)
</div>

<br/>
![Docsify logo](https://docsify.js.org/_media/icon.svg)

<br/>

![Docsify logo](https://docsify.js.org/_media/icon.svg)
![Docsify logo](https://docsify.js.org/_media/icon.svg)



Docsify logo


Docsify logo


I would say let's stay with the mainstream, so it's not a bug. What do you think? @QingWei-Li

@cheng-kang you're right.
We should follow the mainstream usage.

But I will add a new custom component feature so that we can use markdown in HTML.

I found this can be rendered by adding spaces in html...

https://codesandbox.io/s/z2k36lqlrp

# Quick start

<div style='color: red;'>

- a
- b
- c

</div>

thank you for the tip, @QingWei-Li!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrickboulay picture patrickboulay  路  4Comments

randName picture randName  路  4Comments

sijakret picture sijakret  路  3Comments

satu0king picture satu0king  路  3Comments

jhildenbiddle picture jhildenbiddle  路  4Comments