Skip to content

file/folder names with spaces break tag listings #8016

@bj-s

Description

@bj-s

Context

Built-in tags plugin

Bug description

When a file with an inline listing (or any of its parent folders) contains a space in its name, the listing fails silently. Instead of a listing e.g. the following is rendered:

"tags filename with spaces.md:29-51/name"

<h6 filename="filename" id="tags" spaces.md:29-51_slug="spaces.md:29-51/slug" with="with">
    tags filename with spaces.md:29-51/name
</h6>

Related links

Reproduction

9.6.4-filefolder-names-with-spaces-break-tag-listings.zip

Steps to reproduce

  1. Build mkdocs build --verbose
  2. No Warning, Exception or Debug print thrown
  3. open site/tags filename with spaces/index.html (for a file name with spaces) or site/test folder/tags_file/index.html (for a folder name with spaces)
  4. you can see the issue
  5. site/tags_file/index.html shows that tags work when the file name does not contain spaces

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open🏆 perfectIssue is of outstanding quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions