a lodda changes my guy

This commit is contained in:
2026-01-30 15:56:58 +00:00
parent d82dc87af1
commit 63ad9247bc
10 changed files with 101 additions and 82 deletions

View File

@@ -1,19 +1,18 @@
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
}
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
}