feat: request to file bug when libmedium encounters unknown formatting rules

This commit is contained in:
Aravinth Manivannan 2022-01-05 11:36:15 +05:30
parent ebb5d5175b
commit 6aa6b0c097
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
3 changed files with 22 additions and 4 deletions

View File

@ -1,4 +1,3 @@
<p>
<. if p.markups.is_empty() {.>
<.= p.text .>
<.} else {.>
@ -41,4 +40,3 @@
<.= p.text.slice(cur..) .>
<.}.>
<.}.>
</p>

View File

@ -133,3 +133,8 @@ iframe {
.gist_link {
margin-left: 5px;
}
.libmedium__meta {
background-color: rgb(255, 165, 0);
padding: 5px;
}

View File

@ -26,7 +26,7 @@
<. if p.type_ == "IMG" {.>
<. include!("./img.html"); .>
<.} else if p.type_ == "P" {.>
<. include!("./p.html"); .>
<p><. include!("./_markup.html"); .></p>
<.} else if p.type_ == "H2" {.>
<h2><.= p.text .></h2>
<.} else if p.type_ == "H3" {.>
@ -48,7 +48,22 @@
<.} else {.>
<iframe src="<.= src .>" frameborder="0"></iframe>
<.}.>
<.}.>
<.} else {.>
<p>
<. include!("./_markup.html"); .>
</p>
<p class="libmedium__meta">
<b>From LibMedium:</b> LibMedium is built by reverse
engineering the Meduim's internal API. This post contains
markup(formatting rules) that we are unaware of.
Please report this URL <a
href="https://github.com/realaravinth/libmedium/issues/1"
rel="noreferrer">on our bug tracker</a> so that we can
improve page rendering.
<br />
Alternatively, you can also email me at realaravinth at batsense dot net!
</p>
<.}.>
<.}.>
</article>
</main>