Skip to content

Conversation

@zolrath
Copy link

@zolrath zolrath commented Jan 4, 2024

Pull request

Description

      // Files shouldn't have --- at the head or foot
      // It is added automatically here
      if (i + 1 < sourceUrls.length) {
        source += "---"
      }

Based off this comment in index.html each individual slide should not need to have a leading or trailing ---, but currently this does not work correctly.

The intro.md and slide1.md slides have a trailing --- at the foot of the file which allows the files to be split into individual pages.

The slide2.md file lacks the trailing --- and matching that style on the previous or future slides leads to files being merged into a single slide.

By adding source += "---\n---" instead, we can remove the footer --- from all slides and still have them display correctly.

Expectation

Please check all the relevant components;

  • Code review && test

How to

  • Pull this project and create a local webserver to serve its directory using the instructions listed in the README.md.
  • Create a new slide and do not add a trailing --- to the footer.
  • Add the new slide to the sourceUrls array in index.html.
  • Observe the slides properly separated.

Alternatives

If the functionality listed in the comment in index.html isn't actually desired the comment can be changed.

The comment above the line implies that we shouldn't have to end the
slide with ---, but as-is any slide without --- will be merged with the
slide that follows it.

By adding an additional --- to the file we no longer need the foot ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant