Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
boltlessengineer opened this issue Jan 12, 2025 · 0 comments
Open

Comments

@boltlessengineer
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant