From 6aa6b0c097dae6c2b8a69e7c9bff08ee86c85952 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Wed, 5 Jan 2022 11:36:15 +0530 Subject: [PATCH] feat: request to file bug when libmedium encounters unknown formatting rules --- templates/{p.html => _markup.html} | 2 -- templates/main.css | 5 +++++ templates/post.html | 19 +++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) rename templates/{p.html => _markup.html} (99%) diff --git a/templates/p.html b/templates/_markup.html similarity index 99% rename from templates/p.html rename to templates/_markup.html index a1dcee6..fc792b2 100644 --- a/templates/p.html +++ b/templates/_markup.html @@ -1,4 +1,3 @@ -

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

diff --git a/templates/main.css b/templates/main.css index 4885427..ee86c29 100644 --- a/templates/main.css +++ b/templates/main.css @@ -133,3 +133,8 @@ iframe { .gist_link { margin-left: 5px; } + +.libmedium__meta { + background-color: rgb(255, 165, 0); + padding: 5px; +} diff --git a/templates/post.html b/templates/post.html index 4802f49..116db2b 100644 --- a/templates/post.html +++ b/templates/post.html @@ -26,7 +26,7 @@ <. if p.type_ == "IMG" {.> <. include!("./img.html"); .> <.} else if p.type_ == "P" {.> - <. include!("./p.html"); .> +

<. include!("./_markup.html"); .>

<.} else if p.type_ == "H2" {.>

<.= p.text .>

<.} else if p.type_ == "H3" {.> @@ -48,7 +48,22 @@ <.} else {.> <.}.> - <.}.> + <.} else {.> +

+ <. include!("./_markup.html"); .> +

+

+ From LibMedium: 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 on our bug tracker so that we can + improve page rendering. +
+ Alternatively, you can also email me at realaravinth at batsense dot net! +

+ <.}.> <.}.>