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

fragment-interaction with lists/multi-line-fragments #23

Open
christianklauss opened this issue Feb 23, 2019 · 2 comments
Open

fragment-interaction with lists/multi-line-fragments #23

christianklauss opened this issue Feb 23, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@christianklauss
Copy link

I am encountering some occasional problems when using fragments with lists. I am new to Hugo (great work on the theme BTW) so I am not sure if I am missing something or this is a bug.

Take this for example:

# Foo
Foo: bar.

__Foo Bar__: {{% fragment %}} __Foo__ {{% /fragment %}} {{% fragment %}} __Bar__ {{% /fragment %}}

{{% fragment %}}
* Foo
* Bar
{{% /fragment %}}
  1. I would expect the third fragment containing the list to be hidden but it is not (theme is "moon"). Am I missing something, is this a scenario where one should use the reveal markdown processor or use HTML directly?
  2. What about "fragment lists" where each item appears after another. What would be the go-to solution there?
@joshed-io
Copy link
Owner

joshed-io commented Feb 26, 2019

Thanks for opening the issue @christianklauss.

  1. I tried to reproduce this one but couldn't. When I load a slide with that code on it, the fragment with the list is hidden at first and then appears after advancing forward. Also used moon theme. Do you any additional code or repo you could point me to for testing?

  2. Fragment lists are a challenge with reveal-hugo right now, this is something that should be addressed. The best workaround for now is something like this:

* {{% frag c="Foo" %}}
* {{% frag c="Bar" %}}
* {{% frag c="Baz" %}}

frag is the same as fragment, just a more terse way to write it (fragment should work too though). The downside is that you'll see the empty bullets, I couldn't figure out a way to get rid of those (other than adding CSS/JS). Another workaround would be a write the slide with the Reveal.js markdown until reveal-hugo supports this better.

@joshed-io joshed-io added the enhancement New feature or request label Feb 26, 2019
@christianklauss
Copy link
Author

  1. I tried making a small repro case (does not include the theme directory but it was the most recent version of the repo). Maybe you can check if this reproduces for you using this: Repro
    It seems not to happen consistently. I`ve also seen the syntax work as you describe while experimenting around but with this it happens to consistently on my machine.

  2. Okay those are two viable work-arounds. Thanks. It would be a great enhancement to have this supported in the theme directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants