Last active
May 17, 2020 16:46
-
-
Save AprilSylph/70361dde77b5885ce21ddfaa106c264d to your computer and use it in GitHub Desktop.
make HTML display as markdown syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1, h2, h3, h4, h5, h6 { | |
font-size: 1em !important; | |
font-weight: normal !important; | |
} | |
h1::before { content: "# " !important; } | |
h2::before { content: "## " !important; } | |
h3::before { content: "### " !important; } | |
h4::before { content: "#### " !important; } | |
h5::before { content: "##### " !important; } | |
h6::before { content: "###### " !important; } | |
i, em { | |
font-style: normal !important; | |
} | |
i::before, i::after, | |
em::before, em::after { | |
content: "_" !important; | |
} | |
b, strong { | |
font-weight: normal !important; | |
} | |
b::before, b::after, | |
strong::before, strong::after { | |
content: "**" !important; | |
} | |
ul { | |
list-style-type: none !important; | |
} | |
ul > li::before { | |
content: "- " !important; | |
} | |
a { | |
text-decoration: none !important; | |
color: inherit !important; | |
} | |
a::before { | |
content: "[" !important; | |
} | |
a::after { | |
content: "](" attr(href) ")" !important; | |
text-transform: none !important; | |
} | |
code, samp, pre { | |
font-family: inherit !important; | |
} | |
code::before, code::after, | |
samp::before, samp::after { | |
content: "`" !important; | |
} | |
pre::before { | |
content: "```\000A" !important; | |
} | |
pre::after { | |
content: "\000A```" !important; | |
} | |
s, del { | |
text-decoration: none !important; | |
} | |
s::before, s::after, | |
del::before, del::after { | |
content: "~~" !important; | |
} | |
hr { | |
margin: 0 !important; | |
border: none !important; | |
height: auto !important; | |
color: inherit !important; | |
} | |
hr::before { | |
content: "---"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment