hakimel / reveal.js

The HTML Presentation Framework
https://revealjs.com
MIT License
67.66k stars 16.64k forks source link

Data Seperator #2376

Open pwjablonski opened 5 years ago

pwjablonski commented 5 years ago

I am trying to create a data-separator for every new line with ## without removing the ##. I am using the regex \n(?=##) which works except it creates vertical slides instead of horizontal slides. It works horizontally in most other instances ie '^\n`. Unfortunately, the content will eventually come from and external source so I can not just modify the markdown. I can't seem to figure out why this would be?

<section
  class="slides-data"
  data-markdown
  data-separator="\n(?=##)"
>
  <textarea data-template>
          # No Lesson Specified

          ## Please add the make sure the url has the correct parameters.

          ## For example...

    </textarea>
</section>
cf020031308 commented 5 years ago

I have this same issue too.


Then I gave up and removed the \n(?=#+) like pattern and then, guess what, I found that newlines followed by # is separated as default.

shuart commented 4 years ago

Same issue. I don't get it, I tried

        <div class="reveal">
            <div class="slides">
                 <section class="slides-data" data-markdown data-separator="\n(?=##)">
                                       <textarea data-template>
                                       </textarea>
                                </section>
            </div>
        </div>

That one worked but it displays the slides as a vertical set

Then I tried

        <div class="reveal">
            <div class="slides">
                 <section class="slides-data" data-markdown data-separator>
                                       <textarea data-template>
                                       </textarea>
                                </section>
            </div>
        </div>

That does nothing

<section class="slides-data" data-markdown>

and so on. Nothing seems to trigger the slide separatation appart from "\n(?=##)" How can I get this behaviour with "----" or "---"