git ssb

0+

Daan Patchwork / py-ssb-markdown



Commit fbea2a3cdb028c079f99faf20e80922ca8aa7f9c

WIP video and audio rendering

not passing but that's because of other issues now I think
Daan Wynen committed on 12/30/2021, 4:23:34 PM
Parent: b39a6109a5b0f60ea8ae5652fb65bbd151ef929a

Files changed

ssb_markdown/rendering.pychanged
ssb_markdown/rendering.pyView
@@ -47,8 +47,15 @@
4747 print(blob_regex)
4848 print(BLOB_SIGIL_REGEX)
4949 if blob_regex.match(src):
5050 img.set("src", self.blob_link_transformer(src))
51 + alt_text = img.get("alt", "")
52 + if alt_text.startswith("video:"):
53 + img.tag = "video"
54 + img.set("controls", "undefined")
55 + elif alt_text.startswith("audio:"):
56 + img.tag = "audio"
57 + img.set("controls", "undefined")
5158 else:
5259 img.set("src", "")
5360
5461 class SigilLinkExtension(Extension):

Built with git-ssb-web