angular / dev-infra

Angular Development Infrastructure
MIT License
62 stars 52 forks source link

refactor(shared-docs): improve heading id extraction #2177

Closed JeanMeche closed 1 month ago

JeanMeche commented 1 month ago

fixes #2172

lacolaco commented 1 month ago

@JeanMeche Thanks for the quick fix. However, the current approach will not work for most cases.

It is more important to be able to translate a text while maintaining the ID of the original text than to ID it in the translated language. This is because we do not translate all documents at the same time, but in stages, so we have to keep the links from the untranslated documents working.

I think there is no need to revoke the current approach, but there remains a need for explicit ID designation, as suggested in Issue #2172 .

JeanMeche commented 1 month ago

The issue I have with the solution used on AIO is that it wasn't part of neither the standard nor the extended markdown syntax.

But you're right we could go with the {# myId} syntax which is part of the extended spec.

JeanMeche commented 1 month ago

@lacolaco Both will be supported now 👌

lacolaco commented 1 month ago

@JeanMeche Looks perfect!

josephperrott commented 1 month ago

This PR was merged into the repository by commit 2c0c71a7bd4c285ede149858650fba9dd2a1544e.

The changes were merged into the following branches: main

angular-automatic-lock-bot[bot] commented 2 weeks ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.