From a00b06dd1b93a636ac9e545b37b8207832bf3140 Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Fri, 19 Jul 2019 01:13:11 +1000 Subject: [PATCH] ssg: StaticSitePost: FILENAME_SLUG_REGEX include full paths --- .../Clients/StaticSite/StaticSitePost.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSitePost.cs b/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSitePost.cs index 603ae2a0..e1beed55 100644 --- a/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSitePost.cs +++ b/src/managed/OpenLiveWriter.BlogClient/Clients/StaticSite/StaticSitePost.cs @@ -14,9 +14,13 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite { public class StaticSitePost { + /// + /// The extension of published posts to the site project, including dot. + /// public static string PUBLISH_FILE_EXTENSION = ".html"; + private static Regex POST_PARSE_REGEX = new Regex("^---\r?\n((?:.*\r?\n)*?)---\r?\n\r?\n((?:.*\r?\n)*)"); - private static Regex FILENAME_SLUG_REGEX = new Regex(@"^\d\d\d\d-\d\d-\d\d-(.*?)\.html$"); + private static Regex FILENAME_SLUG_REGEX = new Regex(@"^(?:.*?)\d\d\d\d-\d\d-\d\d-(.*?)\" + PUBLISH_FILE_EXTENSION + "$"); private StaticSiteConfig SiteConfig; public BlogPost BlogPost { get; private set; }