Skip to content

Investigate whether it’s worth it to escape certain whitespace (tabs, spaces) #41

Closed
@wooorm

Description

@wooorm

Initial checklist

Problem

I was working today on reverse engineering GH, focussed on its slugging algo.
I had to figure out whether spaces are handled part of the slugging algorithm, or trimmed.
I couldn’t use mdast and mdast-util-to-markdown to put spaces in text around text inside headings, and instead had to hack an escape-hatch: https://github.com/Flet/github-slugger/pull/38/files#diff-04d6b519dad11fd7ce3eb27c6f96e888f7fd787421ffcaff49b3b1d2014ac04eR45.

Solution

Perhaps tabs and spaces around line breaks, such as a value of ' a ' in a heading, where both sides are next to a line break, those tabs and spaces need to be encoded as character references?

Alternatives

Status quo? 🤷‍♂️

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions