summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSavagePeanut <sourcehut@lazytapir.com>2023-09-03 20:48:25 -0500
committerSavagePeanut <sourcehut@lazytapir.com>2023-09-03 20:48:25 -0500
commit7134ae69acfbb4e991588f24c0b7430cd9ae76dd (patch)
treeca8759547992934189973b601482aee86446aa50 /README.md
parentf4b6a50903ec6d82daf414a448e0175d79293efb (diff)
update README
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md
index 65326c8..b208994 100644
--- a/README.md
+++ b/README.md
@@ -25,3 +25,34 @@ code block
"\\\_escape style_"
Most of them correspond to [XEP-0393: Message Styling](https://xmpp.org/extensions/xep-0393.html).
+
+Methods:
+
+
+format_for_telegram(body: String) -> (body: String, Vec<(format: String, offset: usize, length: usize, language: String)>)
+
+format_for_matrix(body: String) -> body: String
+
+format_body(body: String, new_tags: HashMap<String, (String, String)>) -> String
+
+new_tags = {
+
+ "_": ("<em>", "</em>"),
+
+ "*": ("<strong>", "</strong>"),
+
+ "~": ("<del>", "</del>"),
+
+ "`": ("<code>", "</code>"),
+
+ "```": ("<pre><code>", "</code></pre>"),
+
+ "```language": ('<pre><code class="language-{}">', "</code></pre>"),
+
+ ">": ("<blockquote>", "</blockquote>"),
+
+ "||": ("<span data-mx-spoiler>", "</span>"),
+
+ "\n": ("<br>", "")
+
+}