initial commit

This commit is contained in:
2026-01-29 21:35:36 +00:00
commit b0f9a7048a
17 changed files with 923 additions and 0 deletions

19
gtk-xmpp-markup.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
_ "regexp"
)
// This file implements XEP-0393 partially by providing a function to get a Pango string.
// https://xmpp.org/extensions/xep-0393.html
func convertXEPToPango(text string) string {
/* FIXME this RegEx causes certain strings to appear invisible
text = regexp.MustCompile(`\*([^*]+)\*`).ReplaceAllString(text, "<b>$1</b>")
text = regexp.MustCompile(`_([^_]+)_`).ReplaceAllString(text, "<i>$1</i>")
text = regexp.MustCompile(`~([^~]+)~`).ReplaceAllString(text, "<s>$1</s>")
text = regexp.MustCompile("`([^`]+)`").ReplaceAllString(text, "<tt>$1</tt>")
*/
return text
}