gitpitch / gitpitch

Markdown Presentations for Tech Conferences, Training, Developer Advocates, and Educators.

Home Page:https://gitpitch.github.io/gitpitch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Indentation of code block in markdown is wrong

anthonygore opened this issue · comments

Describe the bug
My HTML code block is not displaying correctly. Cursory research makes me think this is not a highlight.js problem so my guess is markdown parsing incorrectly

To Reproduce
Here's my slide from pitchme.md. note that I've escaped the backticks in this example to be able to display here

---

<!-- Lecture 15 -->

@snap[north span-100]
### Check-filter data flow
@snapend

@snap[west span-40]
\```html
<app>
  <movie-list />
  <movie-filter>
    <check-filter />
    <check-filter />
  </movie-filter>
</app>
\```
@snapend

@snap[east span-60]
1. User click on each filter is received by `check-filter` component.
2. `check-filter` emits state in an event.
3. Event is received by `movie-filter` and emitted again.
4. Event is received by root Vue instance and sent via props to `movie-list`.
5. `movie-list` receives filter state.
@snapend

Here's how it's displaying, note the HTML markup is not indented correctly

image

Using Sublime text 3 as editor

So I just dropped the markdown snippet you shared into a 3.0 test deck resulting in:

anthony-gore-screenshot

You can see from the above screenshot that I'm not able to reproduce the problem you reported. I also tried your sample code block in a 4.0 test deck and again it rendered cleanly.

Which makes me wonder if your PITCHME.md file contains some unexpected (and potentially invisible) escape characters in your code block that are interfering with the rendering of this slide. This could happen, for example, if you copied and pasted a code block from a webpage directly into your markdown file.

Try deleting all whitespace in your sample code block and then add back the spaces necessary to recreate the desired indentation. Then view your deck again to see if the problem is fixed.

If that doesn't resolve the issue then please pass along a link to the repo where your presentation files are found and point me at the markdown/slide in question.