Skip to content

Make default syntaxes public #1448

@matthew-carroll

Description

@matthew-carroll

Is there a reason that the default inline syntaxes are private?

https://github.com/dart-lang/markdown/blob/782b1803a29aa964410d93b4437d5d1efa47f6b4/lib/src/inline_parser.dart#L26

Imagine that I want the defaults, but I want to add my own syntax either as top priority, or bottom priority. With public defaults, that's as easy as:

inlineSyntaxes: [
  myTopPrioritySyntax,
  ...defaultInlineSyntaxes,
  myBottomPrioritySyntax,
]

But if the defaults are private then the developer has to dig through the source code to fine them, and then has to copy them over. There will be cases where that's still necessary, because sometimes a new syntax needs to be placed at a specific location in the priority list, but the most common case probably doesn't require that level of intervention.

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