kopia lustrzana https://github.com/tsileo/little-boxes
Fix tests
rodzic
4efec8e74c
commit
b4751b1bd2
|
@ -37,7 +37,9 @@ def hashtagify(content: str) -> Tuple[str, List[Dict[str, str]]]:
|
|||
return content, tags
|
||||
|
||||
|
||||
def mentionify(content: str, hide_domain: bool = False) -> Tuple[str, List[Dict[str, str]]]:
|
||||
def mentionify(
|
||||
content: str, hide_domain: bool = False
|
||||
) -> Tuple[str, List[Dict[str, str]]]:
|
||||
tags = []
|
||||
for mention in re.findall(MENTION_REGEX, content):
|
||||
_, username, domain = mention.split("@")
|
||||
|
|
|
@ -41,8 +41,8 @@ def test_little_content_helper_mention(_):
|
|||
|
||||
content, tags = content_helper.parse_markdown("hello @dev@microblog.pub")
|
||||
assert content == (
|
||||
'<p>hello <span class="h-card"><a href="https://microblog.pub" class="u-url mention">@<span>dev</span></a>'
|
||||
"</span></p>"
|
||||
'<p>hello <span class="h-card"><a href="https://microblog.pub" class="u-url mention">@<span>dev</span>'
|
||||
"@<span>microblog.pub</span></a></span></p>"
|
||||
)
|
||||
assert tags == [
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue