Broken project to implement a cross-protocol browser in textual
Gemtext: Format quotes in italics
Zach DeCook 2023-01-23
parent 419aafc · commit 66c8127
-rw-r--r--browset.css3
-rw-r--r--mime/gemtext.py5
2 files changed, 8 insertions, 0 deletions
diff --git a/browset.css b/browset.css
index f3ebc9f..5efa6d6 100644
--- a/browset.css
+++ b/browset.css
@@ -30,6 +30,9 @@
}
.h3.header {
}
+Quote {
+ text-style: italic;
+}
Preformatted {
height: auto;
border: round white;
diff --git a/mime/gemtext.py b/mime/gemtext.py
index 9436d3f..1f1cdfb 100644
--- a/mime/gemtext.py
+++ b/mime/gemtext.py
@@ -32,9 +32,14 @@ class Gemtext(Static):
count = line.split(' ')[0][0:3].count("#")
w = Static(line.lstrip("#"), markup=False, classes="header h"+str(count))
self.mount(w)
+ elif line.startswith(">"):
+ self.mount(Quote(line, markup=False))
else:
self.mount(Static(line, markup=False))
+class Quote(Static):
+ pass
+
class Preformatted(Container):
pass