From: Sergey Matveev Date: Mon, 12 Jul 2021 08:08:57 +0000 (+0300) Subject: Escape Texinfo-related feeds lists X-Git-Url: http://www.git.stargrave.org/?p=linksexp.git;a=commitdiff_plain;h=a803c543ca637462dc575afc5cd26c0a7ee6b461 Escape Texinfo-related feeds lists --- diff --git a/main.go b/main.go index 875291d..ffa3246 100644 --- a/main.go +++ b/main.go @@ -148,7 +148,10 @@ func main() { } fmt.Printf( " @item %d @tab @url{%s,, %s} %s @tab %s @tab\n", - n, ent["URL"][0], ent["Title"][0], note, + n, + strings.ReplaceAll(ent["URL"][0], "@", "@@"), + strings.ReplaceAll(ent["Title"][0], "@", "@@"), + note, strings.Join(catsOther, ", "), ) switch feeds := ent["Feed"]; len(feeds) { @@ -161,7 +164,10 @@ func main() { ) default: for i, feed := range feeds { - fmt.Printf(" @url{%s, feed%d}\n", feed, i) + fmt.Printf( + " @url{%s, feed%d}\n", + strings.ReplaceAll(feed, "@", "@@"), i, + ) } } }