PeterFeicht / cppreference-doc

C++ standard library reference
en.cppreference.com
GNU General Public License v3.0
576 stars 47 forks source link

Fix handling of slash-escaped characters in the page title #32

Closed mikucionisaau closed 1 week ago

mikucionisaau commented 2 years ago

Implements the fix described in #31.

Issue: operator""sv (and many others) contain quote characters which appear as operator\"\"sv in HTML, but the regex in build_link_map.py stops at the first (escaped) quote which results in broken links in output/link-map.xml. Instead, the regex is adjusted to eat all slash-escaped characters until the real quote. Then the escaped quotes are converted to plain quotes and correctly appear as operator""sv in the final output/link-map.xml (which eventually works in devhelp).

Playground for regex: https://regex101.com/r/qCPJhi/1

PeterFeicht commented 1 year ago

Sorry about not responding to your PR, I haven't been very actively working on this. I'll take a look whenever I get to working on issues.

mikucionisaau commented 1 year ago

No problem, it's rather minor :-)

PeterFeicht commented 1 week ago

Merged in e1d3311.