Article: parse document separators properly

Document separators should start with a newline, followed by three
dashes, followed by a newline again.
This commit is contained in:
Chris Josten 2021-10-11 15:15:12 +02:00
parent 75f5d447d6
commit 48b95c4a13
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ class Page {
this.m_name = file;
this.m_contentSource = readText(file);
// Find the seperator and split the string in two
const uint seperatorIndex = cast(uint) lastIndexOf(m_contentSource, "---\n");
const uint seperatorIndex = cast(uint) lastIndexOf(m_contentSource, "\n---\n");
enforce!ArticleParseException(seperatorIndex >= 0);
string header = m_contentSource[0..seperatorIndex];