Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown anchors have invalid characters #457

Closed
derlin opened this issue Oct 6, 2021 · 1 comment
Closed

markdown anchors have invalid characters #457

derlin opened this issue Oct 6, 2021 · 1 comment

Comments

@derlin
Copy link
Contributor

derlin commented Oct 6, 2021

The markdown anchors (inside <a name=".."> and in the TOC contain special characters such as . and / that are not compatible with BitBucket and some other tools. It would be great to sanitize the anchors, by replacing any slash with _ and any special character with -.

For example, given a proto com.example.test.Example, the generated anchor would be:

<a name="com-example-test-example"></a>

And for a file com/example/test/v1/example.proto:

<a name="com_example_test_v1_example-proto">
derlin added a commit to derlin/protoc-gen-doc that referenced this issue Oct 13, 2021
Replace all special characters in markdown anchors
with `-` (and `/` with `_`) so that they work everywhere
(e.g. BitBucket).

see pseudomuto#457
derlin added a commit to derlin/protoc-gen-doc that referenced this issue Oct 13, 2021
Replace all special characters in markdown anchors
with `-` (and `/` with `_`) so that they work everywhere
(e.g. BitBucket).

see pseudomuto#457
@pseudomuto
Copy link
Owner

Closed via #460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants