Open inliquid opened 3 years ago
As of HTML 5 wrapping block element in <a> is valid HTML.
<a>
However this renderer breaks a construction with <a> links, because they will be wrapped in <p>:
<p>
MD input:
<a href="/asset/upload/post/2713/789f4b70fb52b581274758966463dd7b.zip" target="_blank"><div class="file-icon file-icon-xl" data-type="zip"></div></a>
HTML output:
<p><a href="/asset/upload/post/2713/789f4b70fb52b581274758966463dd7b.zip" target="_blank" rel="nofollow noopener"><div class="file-icon file-icon-xl" data-type="zip"></div></a></p>
And as a result browser will break everything by parsing it as:
<p><a href="/asset/upload/post/2713/789f4b70fb52b581274758966463dd7b.zip" target="_blank" rel="nofollow noopener"></a></p><div class="file-icon file-icon-xl" data-type="zip"></div><p></p>
Is there a way to make renderer not add <p> around <div> inside <a>?
<div>
As of HTML 5 wrapping block element in
<a>
is valid HTML.However this renderer breaks a construction with
<a>
links, because they will be wrapped in<p>
:MD input:
HTML output:
And as a result browser will break everything by parsing it as:
Is there a way to make renderer not add
<p>
around<div>
inside<a>
?