Since #150, when typographer quotes were enabled, searching for text with quotation marks using the searchbox was made slightly more difficult as the search pattern would not match each of the different quotation mark types. This patch addresses this by using a regex which contains the search query, and creates a pattern that matches the various quote types.
Hard-coded values for now. This works by setting the left/right margins of the page dynamically (e.g on window resize). The margins are calculated to limit the text's width between a value. If the window width is less than this text width, the text fill width is the same width as the page, the margins in this case will be the user's configured margins (not yet implemented).
When searching for something that wasn't in the page, the cursor would be moved to the top or bottom of the page (depending on search direction). This fixes that by only moving the page if the search term is actually in the current buffer.
- use Qt::GlobalColor table instead of switch-case for default 16 colors
- move background or foreground check below color generation
- remove setFgColor() and setBgColor() functions since we can do it in one line.
The question box was showed when the redirect has a different scheme or host,
without checking first if you want to see the it, which could lead to an empty
dialog box instead of skipping it entirely.
That commit broke resolving relative urls (e.g. when you were browsing
README.md, the link that goes to BUILDING resolved to README.md/BUILDING).
This reverts commit 601887655e.
When navigating to many sites, such as gemini://rawtext.club:1965/~sloum/geminilist and not having a trailing slash at the end of the URL, local links on the page would be incorrectly generated by QUrl::resolved, which would cause links to give a 'resource not found' error if they weren't at the root path of the server. This patch fixes this by making sure that all links given to the renderers include trailing slashes.