Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line numbers missing on first slide #8

Open
Dunedan opened this issue Feb 6, 2018 · 1 comment
Open

Line numbers missing on first slide #8

Dunedan opened this issue Feb 6, 2018 · 1 comment

Comments

@Dunedan
Copy link
Contributor

Dunedan commented Feb 6, 2018

When the first slide of a presentation contains code which should show line numbers it doesn't work. The line numbers are simply not shown.
When switching then from this first slide to another slide and back, the line numbers are there.

See a minimal example below:

<html>
  <head>
    <link rel="stylesheet" href="css/reveal.css">
    <link rel="stylesheet" href="css/theme/simple.css">
    <link rel="stylesheet" href="lib/css/zenburn.css">
  </head>
  <body>
    <div class="reveal">
      <div class="slides">
        <section>
          <pre><code class="python line-numbers">
print("hello world")
print("see, no line numbers")
          </code></pre>
        </section>
        <section>
          Slide 2
        </section>
      </div>
    </div>
    <script src="lib/js/head.min.js"></script>
    <script src="js/reveal.js"></script>
    <script>
      Reveal.initialize({
        dependencies: [
          { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
          { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
          { src: 'plugin/line-numbers/line-numbers.js', async: false}
        ]
      });
    </script>
  </body>
</html>
@Dunedan
Copy link
Contributor Author

Dunedan commented Feb 6, 2018

Actually it doesn't even have to be the first slide of a presentation, but the first loaded slide is sufficient. So the issue is visible in the sample presentation as well, when using a deep link: https://mikemiles86.github.io/reveal-line-numbers/#/3

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

No branches or pull requests

1 participant