Skip to content

Track upstream jgm/djot#262 for marker-adjacent list-item attribute syntax #185

Description

@dereuromark

Context

djot-php currently supports list-item attributes via a postfix indented line form:

- item 1
  {.highlight #id1}
- item 2

Upstream jgm/djot#262 proposes a different syntax — marker-adjacent:

-{.highlight #id1} item 1
- item 2

These two forms are mutually exclusive on the same input: -{ is currently a list marker followed by { (and parses as the postfix line not applying), while - followed by {...} on the next line is what djot-php recognizes today.

Why deferred

  • Proposal for syntax for attributes on list items jgm/djot#262 is still open with no implementation in djot.lua / djot.js. jgm is low-bandwidth on this.
  • The marker-adjacent form is the more djot-idiomatic one (prefix / adjacency rule, no parse ambiguity), and the eventual upstream decision will likely shape any future change here.
  • markup-carve (a fresh post-djot redesign) declined both forms, so neither has consensus prior-art.
  • A unilateral switch now would either break existing djot-php users (if we replace postfix) or carry permanent dual-syntax baggage.

Decision

Keep the postfix form as the single working list-item-attribute syntax in djot-php for now. Re-evaluate (and adopt the marker-adjacent form, possibly with a deprecation window for postfix) once jgm/djot#262 is resolved upstream.

When to act on this issue

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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