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, "$1") text = regexp.MustCompile(`_([^_]+)_`).ReplaceAllString(text, "$1") text = regexp.MustCompile(`~([^~]+)~`).ReplaceAllString(text, "$1") text = regexp.MustCompile("`([^`]+)`").ReplaceAllString(text, "$1") */ return text }