PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

Optonal meta-header swallows content when absent #65

Closed miniat-amos closed 10 years ago

miniat-amos commented 10 years ago

Example Markdown with no meta-header...

#Amos
Here is some content.

Expected output (omitting most HTML, of course)...

<h1>Amos</h1>
<p>Here is some content.</p>

Current Phile output (omitting most HTML, of course)...

<p>mos</p>
<p>Here is some content.</p>
james2doyle commented 10 years ago

Can you try updating Markdown to 1.4?

Also try putting some whitespace around the header. Like so:

#Amos

Here is some content.
miniat-amos commented 10 years ago

Page.php parseRawData() assumes the header exists post trimming and swallows the first several characters.

I'll post a pull request shortly.

james2doyle commented 10 years ago

Oh I see what you mean.

In what context do you have pages without meta may I ask?

miniat-amos commented 10 years ago

Actually, I had a number of old Markdown files generated from a tool some of my students wrote in the past. They were straight Markdown, so I just put them under the content directory while trying out Phile and noticed the issue.