webpro / reveal-md

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request: Syntax sugar for fragments

robmunger opened this issue · comments

Hi, and thank you for an amazing project! The contributing guidelines said that feature requests and questions were allowed, so here goes...

Would you ever consider adding the following feature?
https://marpit.marp.app/fragmented-list

I am an economics teacher and love using fragments in my slides. I use Marp and find that feature tremendously helpful! I like markdown because it is pleasant to read and edit, but having to put HTML comments after each fragment makes it less so.

Perhaps the functionality to could be enabled in the YAML frontmatter.

Alternatively, would you consider adding an example, either here or in the Readme, of how to use the preprocessor to implement this?

I appreciate any response!

Although very handy, I think it fits more to request this at the Reveal.js repository at https://github.com/hakimel/reveal.js/ as we use their code to interpret markdown into a slideshow. If they implement it, the functionality will be automatically added to reveal-md.

I can set something like <!-- .element: class="fragment" --> and it does work, however there is no way to target a <ul> for instance. It will just make the last <li> in a ul into a fragment. But what I want is to make the whole <ul> a fragment!

With that said: under reveal-md, since markdown allows for inline HTML, the plain approach WORKS:

Things like:

<ul class='fragment'>
    <li>Inserting sanity checks</li>
    <li>Revealing the execution sequence of a program</li>
    <li>Revealing the state of a program</li>
</ul>

shows just like I would want in the presentation, one fragment reveals the entire unordered list.

Thanks for the tip! This is however also totally up to reveal.js (https://revealjs.com/markdown/#element-attributes) as reveal-md doesn't parse this, but just gives it as is to reveal.js.