Hide UID in title when previewed with Marked 2
Hi,
I write my note title as follow : # date-based-uid note title
. But I also have notes titled without UID.
I use Marked 2 app to preview/export my notes. My goal is to make Marked 2 hide the UID in the title when previewed.
I think it is possible to reach the goal as follow:
- Write a preprocessor script for Marked 2, which add a
span
html tag around UID only when there is an UID inh1
tag (the title) - Hide
h1 span
in the CSS theme, so that we only see the note title without the UID
Can someone help me write a simple Marked 2 preprocessor script for that?
Howdy, Stranger!
Comments
I found a solution for the following expected behavior in Marked 2 app:
When (and only when) I preview a note containing UID in title (like
# 202004061230 Title note
), the UID is removed in Marked 2.Add the file as Marked 2 preprocessor (like this
Add in the theme (css file)
#wrapper h1 span {display: none;}
I don't know at all Ruby, I wrote this code quickly after some Internet search, so it can surely be simplified and optimized.
Update with a much simpler solution:
That's all.