Skip to content

Allow whitespace in filepaths inside the round brackets #247

@porg

Description

@porg

Foreword

I filed sbarex/QLMarkdown/issues/80 and it's author informed me that they use your cmark-gfm as their Markdown parser.

Feature request to the cmark-gfm parser

Allow whitespace in filepaths inside the round brackets while:

  • fully compliant syntax experiences no misinterpretations from this more relaxed interpretation,
  • performance impact remains negligible.

At least the whitespace. If possible be as easy and relaxed as possible:

  • Everything inside the round brackets is considered being the filepath.
  • Only round brackets themselves need escaping of course.
  • Whitespace and other special characters get handled/escaped by the system automatically (specific to the filesystem — NTFS, APFS, EXT, … — or transport scheme — file/http/https — where it is in use)
  • If it does not start with a slash it is considered a relative path.

Design Rationale

  • Markdown's goal was/is an easily human readable and writeable markup language!
    • Having to change filenames prior usage with Markdown
      OR
    • Having to transform each   to %20 in the filename everywhere
  • … contradicts both goals IMHO!

Best Practises

Sample

## Images
### Filename without whitespace
![](1.png) --> Render the image inline.
### Filename with whitespace
![](1 b.png) --> Shows the raw markup language instead or rendering the image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions