Markdown data-separator creating vertical slides instead of horizontal
I was trying to use the data-separator of the Markdown plugin to create new section for each h1 and h2 sections in the markdown. I ended up using the following regex data-separator="(^---|\n(?=#\s)|\n(?=##\s))". This uses forward lookup so that h1/h2 tags create a separate section but are not removed. This seems to work except that now I get vertical slides instead of horizontal
Looking at the code, it seems to me that a simple check could fix that
function slidify( markdown, options ) {
isHorizontal = horizontalSeparatorRegex.test( matches[0] );
//isHorizontal = !options.verticalSeparator || horizontalSeparatorRegex.test( matches[0] );
The benefit is that if verticalSeparator is not provided, we don't have to apply the regex and this might be more efficient.
Sorry for necro but I wanna report that is still a problem.
I'm using these regex' for the seperators.
data-separator="^<!-- NEW SLIDE -->|\n(?=#\s)|\n(?=##\s)"
data-separator-vertical="^<!-- VSLIDE -->"
Interestingly, when I use <!-- NEW SLIDE --> to create a new slide, it actually makes a horizontal one.
I also ran into a different problem when using ^## for the regex, where it would create a horizontal slide, but not format the header properly (it was a regular <p> and not a h2).
I'm not sure what causes this, headers seem definetly to handled different. For now I'm sticking to using <!-- NEW SLIDE -->, but I think it would be neat to use headers as well.