|
@@ -19,11 +19,15 @@ class Markdown(Html):
|
|
def apply_tailwind(html: str):
|
|
def apply_tailwind(html: str):
|
|
|
|
|
|
rep = {
|
|
rep = {
|
|
- '<h1>': '<h1 class="text-5xl mb-4 mt-6">',
|
|
|
|
- '<h2>': '<h2 class="text-4xl mb-3 mt-5">',
|
|
|
|
- '<h3>': '<h3 class="text-3xl mb-2 mt-4">',
|
|
|
|
- '<h4>': '<h4 class="text-2xl mb-1 mt-3">',
|
|
|
|
- '<h5>': '<h5 class="text-1xl mb-0.5 mt-2">',
|
|
|
|
|
|
+ '<h1': '<h1 class="text-5xl mb-4 mt-6"',
|
|
|
|
+ '<h2': '<h2 class="text-4xl mb-3 mt-5"',
|
|
|
|
+ '<h3': '<h3 class="text-3xl mb-2 mt-4"',
|
|
|
|
+ '<h4': '<h4 class="text-2xl mb-1 mt-3"',
|
|
|
|
+ '<h5': '<h5 class="text-1xl mb-0.5 mt-2"',
|
|
|
|
+ '<a': '<a class="underline text-blue-600 hover:text-blue-800 visited:text-purple-600"',
|
|
|
|
+ '<ul': '<ul class="list-disc ml-6"',
|
|
|
|
+ '<p>': '<p class="mb-2">',
|
|
|
|
+ '<div\ class="codehilite">': '<div class=" codehilite mb-2 p-2">',
|
|
}
|
|
}
|
|
p = dict((re.escape(k), v) for k, v in rep.items())
|
|
p = dict((re.escape(k), v) for k, v in rep.items())
|
|
pattern = re.compile("|".join(rep.keys()))
|
|
pattern = re.compile("|".join(rep.keys()))
|