qutebrowser/tests
Ryan Roden-Corrent 102c6b99dd
Don't highlight html escapes in completion.
Resolves #4199.

To avoid accidentally highlighting characters that were introduced by
html escaping the text before feeding it to setHtml, we can't just
escape the whole string before adding the highlighting. Instead, we need
to break the string up on the pattern, format and escape the individual
parts, then join them back together.

re.escape includes empty strings if there is a match at the start/end,
which ensures that matches always land on odd indices:

https://docs.python.org/3/library/re.html#re.split

> If there are capturing groups in the separator and it matches at the
> start of the string, the result will start with an empty string. The
> same holds for the end of the string
2018-09-15 14:06:28 -04:00
..
end2end Fix lint and test 2018-09-04 23:46:34 +02:00
helpers Use a shared web_history fixture 2018-09-06 20:08:32 +02:00
manual Update some more references to old config options 2017-07-04 16:46:02 +02:00
unit Don't highlight html escapes in completion. 2018-09-15 14:06:28 -04:00
conftest.py Turn off hypothesis deadline if on CI 2018-07-22 10:13:06 +02:00
test_conftest.py Update copyright years 2018-02-05 12:19:50 +01:00