doc-builder icon indicating copy to clipboard operation
doc-builder copied to clipboard

Markdown link not rendered correctly in a "<Tip>" section

Open Wauplin opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

When using the <Tip> (...) </Tip> syntax, links are generated but not displayed properly in the UI.

Here is an example where it happens: https://huggingface.co/docs/huggingface_hub/main/en/package_reference/login. I define a link in the docstring using the "[login]" syntax which is converted into a markdown link "[login()](/docs/huggingface_hub/main/en/package_reference/login#huggingface_hub.login)" but the rendering fails to display it as a link.

Original docstring:

    <Tip>
    [`login`] is a drop-in replacement method for [`notebook_login`] as it wraps and
    extends its capabilities.
    </Tip>

Generated doc:

[login()](/docs/huggingface_hub/main/en/package_reference/login#huggingface_hub.login) is a drop-in replacement method for [notebook_login()](/docs/huggingface_hub/main/en/package_reference/login#huggingface_hub.notebook_login) as it wraps and extends its capabilities.

Rendering:

login_doc

Describe the solution you'd like

Would love to the a proper clickable link in a Tip section :)

Describe alternatives you've considered

I can remove the link in the Tip section if that's too complicated to fix.

Wauplin avatar Oct 17 '22 15:10 Wauplin

this issue should likely be transferred to huggingface/doc-builder (@mishig25?)

julien-c avatar Oct 18 '22 08:10 julien-c

@julien-c thanks for the hint. Makes more sense indeed. I now moved it.

Wauplin avatar Oct 18 '22 09:10 Wauplin