mirror of
https://github.com/getzola/zola
synced 2024-12-13 13:52:28 +00:00
Fix deleting while zola serve
This commit is contained in:
parent
0bafd4784f
commit
a465d6a61e
3 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 0.5.1 (unreleased)
|
||||
|
||||
- Fix deleting markdown file in `zola serve`
|
||||
|
||||
|
||||
## 0.5.0 (2018-11-17)
|
||||
|
||||
### Breaking
|
||||
|
|
|
@ -21,7 +21,7 @@ use content::ser::SerializingPage;
|
|||
|
||||
lazy_static! {
|
||||
// Check whether a string starts with yyyy-mm-dd{-,_}
|
||||
static ref DATE_IN_FILENAME: Regex = Regex::new(r"^^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))(_|-)").unwrap();
|
||||
static ref DATE_IN_FILENAME: Regex = Regex::new(r"^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))(_|-)").unwrap();
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
|
|
@ -311,7 +311,7 @@ pub fn after_content_change(site: &mut Site, path: &Path) -> Result<()> {
|
|||
if is_md {
|
||||
// only delete if it was able to be added in the first place
|
||||
if !index.exists() && !path.exists() {
|
||||
delete_element(site, path, is_section)?;
|
||||
return delete_element(site, path, is_section);
|
||||
}
|
||||
|
||||
// Added another .md in a assets directory
|
||||
|
|
Loading…
Reference in a new issue