Skip to content

Commit

Permalink
Merge pull request dploeger#32 from dploeger/indented-fragments
Browse files Browse the repository at this point in the history
Make indented list items render as fragments
  • Loading branch information
mrmanc authored Nov 18, 2019
2 parents fca4241 + 10fcb3a commit 6113829
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _layouts/reveal.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@
| replace:'<backgroundimageopacity>','<!-- .slide: data-background-opacity="'
| replace:'</backgroundimageopacity>','" -->'
%}{%
assign first_char = line
assign first_char = line | strip
| slice: 0,1
%}{%
if first_char == '+'
%}{%
assign processed_line = processed_line
| replace_first: '+',''
| prepend: '+ <!-- .element: class="fragment" -->'
| replace_first: '+','+ <!-- .element: class="fragment" -->'
%}{%
endif
%}{{ processed_line }}{% comment %}Following line break is important{% endcomment %}
Expand Down
1 change: 1 addition & 0 deletions _posts/0000-01-03-fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ It's also possible to do fragments.
`+ This is a fragment`
+ This is a fragment
+ Your fragment may contain the ‘+’ character
+ You can also indent fragments

<fragment/>You can use &lt;fragment/&gt; to step other content.

0 comments on commit 6113829

Please sign in to comment.