parent
31604a0cd2
commit
39576ac7f3
54 changed files with 1616 additions and 4012 deletions
11
tests/test_search_helpers.py
Normal file
11
tests/test_search_helpers.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from bouquin.search import Search
|
||||
|
||||
|
||||
def test_make_html_snippet_and_strip_markdown(qtbot, fresh_db):
|
||||
s = Search(fresh_db)
|
||||
long = (
|
||||
"This is **bold** text with alpha in the middle and some more trailing content."
|
||||
)
|
||||
frag, left, right = s._make_html_snippet(long, "alpha", radius=10, maxlen=40)
|
||||
assert "alpha" in frag
|
||||
s._strip_markdown("**bold** _italic_ ~~strike~~ 1. item - [x] check")
|
||||
Loading…
Add table
Add a link
Reference in a new issue