Skip to content

Explicit prefix when writing references on MinML #2

@ranfdev

Description

@ranfdev

I'm implementing a parser for MinML in typescript.
It's mostly done, but it doesn't recognize references containing symbols like - and +.

I could fix that by using backtracking, but I think it would be nicer to keep the parser linear with the ability to lookahead 3 chars.

The following cases, as far as I know, require backtracking to decide how to parse them:
[-[comment]] maps to []
[---] maps to "\u2014"
[----] maps to [----]
[ldquo] maps to some html code.

If references explicitly required a prefix like ., the previous cases wouldn't require backtracking and they would become:
[-[comment]] maps to []
.[---] maps to \u2014
[----] maps to [----]
.[ldquo] maps to some html code.

I feel the brackets are too overloaded and that the syntax .[reference] would bring some clarity.

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