microsoft / qsharp-language

Official repository for design of the quantum programming language Q# and its core libraries
MIT License
233 stars 54 forks source link

Fix links replacement script to handle /tree/ links #73

Closed tcNickolas closed 3 years ago

tcNickolas commented 3 years ago

Currently the script handles only links of the form https://github.com/microsoft/qsharp-language/blob/main/Specifications/Language/, but the documentation also contains links with /tree/ instead of /blob/ which are left unchanged.

This means that on the docs website part of the links point to other pages on the same website and part of the links point to this GitHub repo (for example, the link "example program" on this page or type links here).

It makes sense to unify the behavior for links that are included in the uid mapping.

tcNickolas commented 3 years ago

@bettinaheim Do you know who's a good person to review this? Would be nice to fix the way the links are converted before the next release.

tcNickolas commented 3 years ago

It's always better to do a one-line technical solution than to require different people working on the docs to follow the requirement :-)

geduardo commented 3 years ago

This wasn't enough to fix it since the tree links weren't in the uid map. I opened a PR to add them: https://github.com/MicrosoftDocs/quantum-docs-pr/pull/1158

Hopefully that will work since the script changes first the blob (complete URL ) and then the tree (incomplete URL), so there shouldn't be any unwanted conflicts between replacements.

@tcnickolas