marp-team / marpit

The skinny framework for creating slide deck from Markdown
https://marpit.marp.app/
MIT License
948 stars 45 forks source link

style not working #210

Closed calidion closed 4 years ago

calidion commented 4 years ago
---
<style>
section {
  background: yellow;
}
</style>
Hello world
===

expected to produce

Hello world

only, but got

<style>
section {
  background: yellow;
}
</style>
Hello world
yhatt commented 4 years ago

Try adding blank line after </style>.

<style>
section {
  background: yellow;
}
</style>

Hello world
===

Details for developer

Marpit is following CommonMark but this case has no consensus. Our parser (markdown-it) will parse the heading contents as multi-line html (interpretation 4). Marpit only parses <style> written as html block, so this case that would parse as mixed HTML contents is incompatible.

calidion commented 4 years ago

thanks.