diff --git a/source/nl/netsoj/chris/blog/model/article.d b/source/nl/netsoj/chris/blog/model/article.d index ef4b838..a2b10d4 100644 --- a/source/nl/netsoj/chris/blog/model/article.d +++ b/source/nl/netsoj/chris/blog/model/article.d @@ -34,9 +34,9 @@ class Article : Page { // Find the first header and mark everything up to that as if (m_excerpt is null) { // an excerpt, used in search results. - const uint seperatorIndex = cast(uint) indexOf(m_contentSource, "---\n"); + const long seperatorIndex = cast(long) lastIndexOf(m_contentSource, "---\n"); this.m_excerpt = this.m_contentSource[seperatorIndex + 4..$]; - const uint firstHeaderIndex = cast(uint) indexOf(this.m_excerpt, '#'); + const long firstHeaderIndex = indexOf(this.m_excerpt, '#'); if (firstHeaderIndex >= 0) { this.m_excerpt = this.m_excerpt[0..firstHeaderIndex]; } diff --git a/source/nl/netsoj/chris/blog/model/page.d b/source/nl/netsoj/chris/blog/model/page.d index 833cf46..d80faf0 100644 --- a/source/nl/netsoj/chris/blog/model/page.d +++ b/source/nl/netsoj/chris/blog/model/page.d @@ -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---\n"); + const long seperatorIndex = lastIndexOf(m_contentSource, "\n---\n"); enforce!ArticleParseException(seperatorIndex >= 0); string header = m_contentSource[0..seperatorIndex];