hashtags working

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-09 11:43:18 -07:00
parent 6ac4214be7
commit cac139fff1
6 changed files with 78 additions and 13 deletions

View File

@@ -57,6 +57,10 @@ func parse_post_blocks(content: String) -> [PostBlock] {
blocks.append(parse_post_textblock(str: p.str, from: starting_from, to: pre_mention))
blocks.append(.ref(reference))
starting_from = p.pos
} else if let hashtag = parse_hashtag(p) {
blocks.append(parse_post_textblock(str: p.str, from: starting_from, to: pre_mention))
blocks.append(.hashtag(hashtag))
starting_from = p.pos
} else {
p.pos += 1
}