aboutsummaryrefslogtreecommitdiff
path: root/file_markup.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-06 21:33:45 +0700
committerShulhan <ms@kilabit.info>2023-11-09 20:25:15 +0700
commitbad30877282ff2e584c49ea1a656bf0fa0f3b1fa (patch)
tree3750564f74822352e20d80acebbe5f2460d7df72 /file_markup.go
parent3ca487dff9ea91ef6d60e4a9e7a78ea8e177bff1 (diff)
downloadciigo-bad30877282ff2e584c49ea1a656bf0fa0f3b1fa.tar.xz
all: use modification time when deciding when to convert to HTML
Previously, in changes 46bd8b68dc8c we pass the force=true to Convert function. In this changes, we derive the decision based on modification time of HTML template and markup file. If the HTML template or markup file is newer that HTML file then the new HTML file will be generated.
Diffstat (limited to 'file_markup.go')
-rw-r--r--file_markup.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/file_markup.go b/file_markup.go
index 131b8f7..bca9be2 100644
--- a/file_markup.go
+++ b/file_markup.go
@@ -60,18 +60,6 @@ func NewFileMarkup(filePath string, fi os.FileInfo) (fmarkup *FileMarkup, err er
return fmarkup, nil
}
-// isNewerThanHtml return true if the markup file is newer than HTML file.
-func (fm *FileMarkup) isNewerThanHtml() bool {
- var (
- fi os.FileInfo
- )
- fi, _ = os.Stat(fm.pathHtml)
- if fi == nil {
- return true
- }
- return fm.info.ModTime().After(fi.ModTime())
-}
-
func markupKind(ext string) int {
switch ext {
case extAsciidoc: