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

Support fragment indexing #495

Closed
pavelzw opened this issue Jan 9, 2023 · 4 comments
Closed

Support fragment indexing #495

pavelzw opened this issue Jan 9, 2023 · 4 comments

Comments

@pavelzw
Copy link

pavelzw commented Jan 9, 2023

Version of Marp Tool

@marp-team/marp-cli v2.3.0 (w/ @marp-team/marp-core v3.4.2)

Operating System

macOS

Environment

  • OS version: macOS Ventura 13.1
  • Node.js version (Marpit / Marp Core/ Marp CLI): 19.4.0

How to reproduce

test.md

---
marp: true
---

<div data-marpit-fragments="3">
  <div data-marpit-fragment="2">
    two
  </div>
  <div data-marpit-fragment="1">
    one
  </div>
  <div data-marpit-fragment="3">
    three
  </div>
</div>

marp --html -o test.html test.md

Expected behavior

two <- gets revealed second
one <- gets revealed first
three <- gets revealed third

Actual behavior

two <- gets revealed first
one <- gets revealed second
three <- gets revealed third

Additional information

No response

@pavelzw pavelzw added the bug Something isn't working label Jan 9, 2023
@pavelzw
Copy link
Author

pavelzw commented Jan 9, 2023

Related to maro-team/marpit#264.

@yhatt yhatt removed the bug Something isn't working label Jan 9, 2023
@yhatt
Copy link
Member

yhatt commented Jan 9, 2023

As described at marp-team/marpit#264, Marp only respects DOM order. (Actually indexes assigned to data-marpit-fragment attribute are for another presentation tool made from Marpit framework)

We think it will make confusion that the fragments order is different from visible order, so hints by index number are ignored in Marp. To implement this, we require clear benefit and strong incentive.

@pavelzw
Copy link
Author

pavelzw commented Jan 9, 2023

In my opinion, it is a bit confusing to support index numbers but then have them ignored by marp-cli. I think that the hybrid solution you mentioned here sounds like a good tradeoff.

@yhatt
Copy link
Member

yhatt commented Feb 18, 2023

Close for cleaning up Marp CLI issue tracker. Continue at marp-team/marpit#264 to avoid fragmented discussions at duplicated issues.

@yhatt yhatt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
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

2 participants