diff --git a/_layouts/reveal.html b/_layouts/reveal.html index c04a143..59dc54d 100644 --- a/_layouts/reveal.html +++ b/_layouts/reveal.html @@ -62,13 +62,22 @@ | replace:'','' %}{% - assign first_char = line | strip + assign first_char = line | slice: 0,1 +%}{% + assign first_two = line + | slice: 0,2 %}{% if first_char == '+' %}{% assign processed_line = processed_line - | replace_first: '+','+ ' + | replace_first: '+','' + | prepend: '+ ' +%}{% + elsif first_two == '\+' +%}{% + assign processed_line = processed_line + | replace_first: '\+', '+' %}{% endif %}{{ processed_line }}{% comment %}Following line break is important{% endcomment %} diff --git a/_posts/0000-01-03-fragments.md b/_posts/0000-01-03-fragments.md index cae288c..8b3ceda 100644 --- a/_posts/0000-01-03-fragments.md +++ b/_posts/0000-01-03-fragments.md @@ -8,4 +8,13 @@ It's also possible to do fragments. + Your fragment may contain the ‘+’ character + You can also indent fragments -You can use <fragment/> to step other content. \ No newline at end of file +You can use <fragment/> to step other content. + +-- + +To start a line with a literal `+`, use `\+`: + +```diff +-I am a grate speller +\+I am a great speller +```