Why div tag loses markup on github pages
Using jekyll w / github-pages
I had it in index.md:
<div class="grey-box">
GET /projects/<span class="variable project_id">{Project ID}</span>/codes/<span class="variable code_id">{Code ID}</span>/download
</div>
and when compiling it violated markdown, so I changed the div to a range like this:
<span class="grey-box">
GET /projects/<span class="variable project_id">{Project ID}</span>/codes/<span class="variable code_id">{Code ID}</span>/download
</span>
CSS
.grey-box {
background: #EEE;
padding: 5px 10px;
}
Now everything is a sneak. Any ideas why the div was causing this error?
Markdown does not parse block-level HTML elements, of which <div>one is.
From the documentation :
Please note that Markdown formatting syntax is not processed in block HTML tags. For example, you cannot use Markdown-style * emphasis * inside an HTML block.
This is not only the case with GitHub pages, but also with the vast majority of Markdown parsers.