Skip to content

Literal . (dot) or number (e.g. "3") in header yields local id not found [myst.xref_missing] #985

Description

@raoulbhatia

What version of myst-parser are you using?

2.0.0

What version dependencies are you using?

Sphinx v7.3.7

What operating system are you using?

Mac

Describe the Bug

(ATTN: Shortened examples)

File container_intro.md contains:

# lxc.env for environment variables

I have another document container_from_scratch.md where I want to reference this header in a link like

Please see the [container intro about environment](./container_intro.md#lxc-env-for-environment-variables)

This produces the following error:

[...]
writing output... [100%] index
docs/container/container_from_scratch.md:304: WARNING: local id not found in doc 'docs/container/container_intro': 'lxc-env-for-environment-variables' [myst.xref_missing]
generating indices... genindex done
[...]

Other combinations also do NOT work, e.g. adding an explicit (lxc-env)= target

[](container_intro.md#lxc-env)

⚠️ The only way to resolve this WARNING is to REMOVE the dot from the header, e.g.

### lxcenv for environment variables

and changing the link to container_intro.md#lxc-env-for-environment-variables.

⚠️ NOTE: The links work in the end, it is just a distracting, red WARNING

Expected Behavior

No WARNING is issued, parsing works.

To Reproduce

Create 2 documents like above and compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions