Skip to content

[Suggestion]: Use #(...) instead of +... for weak carryover tags #52

@boltlessengineer

Description

@boltlessengineer

Original idea mentioned from this comment I wrote before.

As macros and attributes are separated from #38, now strong/weak carryover tag makes less sense.

Before both are macros modifying next element and the term "strong" and "weak" represents how large it's next element can be.
With #38, weak carryover tag is classified as an attribute, not a macro.
And the next element rule is also not true so the weak carryover tag is not weak anymore.

Weak carryover tag is not weak nor elementary version of strong carryover tags.

Idea

Change this:

+color red
+background blue
paragraph text

to this:

#(color red;
  background blue)
paragraph text

#(color red)
#(background blue)
this is also possible

Pros

  • Reduce the number of special prefix tokens that user have to remember
  • Generalized way to put attributes (carryover tags, detached modifier extensions, attached modifier extensions share same syntax)
  • User can choose the single-line / multi-line style for block attributes
    #(color red; background blue; foo; bar)
    paragraph text
    
    #(color red;
      background blue;
      foo;
      bar)
    paragraph text
    
  • smaller parser size (it won't be meaningful amount though)

Cons

  • This might be unnecessary breaking change to v1 spec.

Yes, this is a breaking change, but #38 is already a breaking change for weak carryover tags.
The weak carryover tag rule is already broken:

v1 spec:

+color red
- list item 1 (red)
- list item 2 (not red)

new spec:

+color red
- list item 1 (red)
- list item 2 (also red)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions