From 2796a2e82f16ade9872008878cf88299bd66b4e7 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:47:35 +0200 Subject: [feature] Hashtag federation (in/out), hashtag client API endpoints (#2032) * update go-fed * do the things * remove unused columns from tags * update to latest lingo from main * further tag shenanigans * serve stub page at tag endpoint * we did it lads * tests, oh tests, ohhh tests, oh tests (doo doo doo doo) * swagger docs * document hashtag usage + federation * instanceGet * don't bother parsing tag href * rename whereStartsWith -> whereStartsLike * remove GetOrCreateTag * dont cache status tag timelineability --- internal/text/markdown_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/text/markdown_test.go') diff --git a/internal/text/markdown_test.go b/internal/text/markdown_test.go index 86e663dad..2602506ca 100644 --- a/internal/text/markdown_test.go +++ b/internal/text/markdown_test.go @@ -49,13 +49,13 @@ const ( withInlineCode2 = "`Nobody tells you about the SECRET CODE, do they?`" withInlineCode2Expected = "

Nobody tells you about the </code><del>SECRET CODE</del><code>, do they?

" withHashtag = "# Title\n\nhere's a simple status that uses hashtag #Hashtag!" - withHashtagExpected = "

Title

here's a simple status that uses hashtag #Hashtag!

" + withHashtagExpected = "

Title

here's a simple status that uses hashtag #Hashtag!

" mdWithHTML = "# Title\n\nHere's a simple text in markdown.\n\nHere's a link.\n\nHere's an image: \"The" mdWithHTMLExpected = "

Title

Here's a simple text in markdown.

Here's a link.

Here's an image: \"The

" mdWithCheekyHTML = "# Title\n\nHere's a simple text in markdown.\n\nHere's a cheeky little script: " mdWithCheekyHTMLExpected = "

Title

Here's a simple text in markdown.

Here's a cheeky little script:

" mdWithHashtagInitial = "#welcome #Hashtag" - mdWithHashtagInitialExpected = "

#welcome #Hashtag

" + mdWithHashtagInitialExpected = "

#welcome #Hashtag

" mdCodeBlockWithNewlines = "some code coming up\n\n```\n\n\n\n```\nthat was some code" mdCodeBlockWithNewlinesExpected = "

some code coming up

\n\n\n

that was some code

" mdWithFootnote = "fox mulder,fbi.[^1]\n\n[^1]: federated bureau of investigation" @@ -63,7 +63,7 @@ const ( mdWithBlockQuote = "get ready, there's a block quote coming:\n\n>line1\n>line2\n>\n>line3\n\n" mdWithBlockQuoteExpected = "

get ready, there's a block quote coming:

line1
line2

line3

" mdHashtagAndCodeBlock = "#Hashtag\n\n```\n#Hashtag\n```" - mdHashtagAndCodeBlockExpected = "

#Hashtag

#Hashtag\n
" + mdHashtagAndCodeBlockExpected = "

#Hashtag

#Hashtag\n
" mdMentionAndCodeBlock = "@the_mighty_zork\n\n```\n@the_mighty_zork\n```" mdMentionAndCodeBlockExpected = "

@the_mighty_zork

@the_mighty_zork\n
" mdWithSmartypants = "\"you have to quargle the bleepflorp\" they said with 1/2 of nominal speed and 1/3 of the usual glumping" @@ -77,9 +77,9 @@ const ( mdObjectInCodeBlock = "@foss_satan@fossbros-anonymous.io this is how to mention a user\n```\n@the_mighty_zork hey bud! nice #ObjectOrientedProgramming software you've been writing lately! :rainbow:\n```\nhope that helps" mdObjectInCodeBlockExpected = "

@foss_satan this is how to mention a user

@the_mighty_zork hey bud! nice #ObjectOrientedProgramming software you've been writing lately! :rainbow:\n

hope that helps

" mdItalicHashtag = "_#hashtag_" - mdItalicHashtagExpected = "

#hashtag

" + mdItalicHashtagExpected = "

#hashtag

" mdItalicHashtags = "_#hashtag #hashtag #hashtag_" - mdItalicHashtagsExpected = "

#hashtag #hashtag #hashtag

" + mdItalicHashtagsExpected = "

#hashtag #hashtag #hashtag

" // BEWARE: sneaky unicode business going on. // the first ö is one rune, the second ö is an o with a combining diacritic. mdUnnormalizedHashtag = "#hellöthere #hellöthere" -- cgit v1.2.3