gnab / remark

A simple, in-browser, markdown-driven slideshow tool.
http://remarkjs.com
MIT License
12.67k stars 854 forks source link

First line disappears when starting with single word and colon #688

Open vicmortelmans opened 1 year ago

vicmortelmans commented 1 year ago

Hi,

when the first line of a slide starts with a single word and a colon, this line is not shown on the slide.

I suppose the reason is that it is processed as a slide property "name class background-image count template layout".

Since it's not unlikely for slide content to start with word and a colon, an improvement would be to limit the 'disappearing' to lines starting with the listed keywords. Other words have no effect at all on the slides, unless I'm mistaking?

Here's an example:

<!DOCTYPE html>
<html>
  <head>
    <title>Title</title>
    <meta charset="utf-8">
    <style>
      @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
      @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
      @import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);

      body { font-family: 'Droid Serif'; }
      h1, h2, h3 {
        font-family: 'Yanone Kaffeesatz';
        font-weight: normal;
      }
      .remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
    </style>
  </head>
  <body>
    <textarea id="source">

class: center, middle

# Title

---

word: A slide starting with "word:".

The first line above is showing?

    </textarea>
    <script src="https://remarkjs.com/downloads/remark-latest.min.js">
    </script>
    <script>
      var slideshow = remark.create();
    </script>
  </body>
</html>
tripu commented 1 year ago

A workaround: insert an invisible separator between the word and the colon.

Here's a demo.