Skip to content

feature: Keep data-attributes of spans #41

@pawamoy

Description

@pawamoy

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

I'd like to take advantage of mkdocs-material's instant previews, by adding data-preview to autorefs spans generated by mkdocstrings-python. Unfortunately, autorefs matches spans with a regex, and this regex is strict and only matches spans with exactly one data-autorefs-* attribute.

Describe the solution you'd like

I'd like autorefs to allow other data- attributes to appear in its spans, and report them to anchors when it transforms them.

Describe alternatives you've considered

/

Additional context

squidfunk/mkdocs-material#6704

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions