Search code examples
python-sphinxrestructuredtextread-the-docs

Is a Bullet List With a Long Link Possible in RST Without Warnings?


I have a long link escaped like this:

`Build Azure Devops Agents With Linux cloud-init for Dotnet Development \
[terraform, azure, devops, docker, dotnet, cloud-init]`_

.. _Build Azure Devops Agents With Linux cloud-init for Dotnet Development [terraform, azure, devops, docker, dotnet, cloud-init]: https://codingsoul.org/2022/04/25/build-azure-devops-agents-with-linux-cloud-init-for-dotnet-development/

However, if I try to make that link part of a bullet list:

- `Build Azure Devops Agents With Linux cloud-init for Dotnet Development \     
[terraform, azure, devops, docker, dotnet, cloud-init]`_

.. _Build Azure Devops Agents With Linux cloud-init for Dotnet Development [terraform, azure, devops, docker, dotnet, cloud-init]: https://codingsoul.org/2022/04/25/build-azure-devops-agents-with-linux-cloud-init-for-dotnet-development/

I get the following warning:

Inline interpreted text or phrase reference start-string without end-string.

I don't know how to parse that warning and the docs / online searches haven't helped me.

Surely bullet lists of long links are a common use case and I'm just missing some obvious documentation somewhere, right?

Here is a bullet list (of long links, coincidentally) I came across in my search that didn't help:


Solution

  • This works for me. You need to indent second and subsequent lines in a list item to align with the first character in the first line.

    -   `Build Azure Devops Agents With Linux cloud-init for Dotnet Development \
        [te3rraform, azure, devops, docker, dotnet, cloud-init]`_
    
    .. _Build Azure Devops Agents With Linux cloud-init for Dotnet Development [te3rraform, azure, devops, docker, dotnet, cloud-init]: https://codingsoul.org/2022/04/25/build-azure-devops-agents-with-linux-cloud-init-for-dotnet-development/
    

    Also your link label also did not match, which generated an error of ERROR: Unknown target name: "Build Azure Devops Agents With Linux cloud-init for Dotnet Development \ [terraform, azure, devops, docker, dotnet, cloud-init]".