There has been some level of desire for the ability to make the date modified be set whenever the user makes a change to the editor/file via Obsidian. In order to do this, there is a need to know whenever the editor is updated. When it is, it will set off a debounced action to update the date modified so long as the user does not remove the changes by the time that the debounced function runs.
There were also some style changes made to cut down some on the whitespace that was present, but not necessary.
There was also a wording update to try to make things clearer that the lint on file change only happens when focused file changes.
Changes Made:
Updated Lint on File Change to Lint on Focused File Change
Adds ability to run the YAML timestamp rule x seconds after the last editor change (it tries to keep from updating the date modified if no net changes were made in the editor between when the first change was made and the debounce ran)
Tries to make sure that the other linting logic at the end updates the original file text for any debounce functions that exist to try to keep from unnecessarily adding a another timestamp update if it is not necessary
Adds a dropdown for determining the source of truth for date modified and date created
TODO:
[x] Swap boolean setting for trusting created date in the YAML as the source of truth to a dropdown
[x] Add a similar option for date modified where only changes in Obsidian are recorded
[x] Try to account for no valid created date provided (0 as the ctime should instead be now)
Fixes #183 Fixes #890 Fixes #1161 Fixes #1162 May fix #995
There has been some level of desire for the ability to make the date modified be set whenever the user makes a change to the editor/file via Obsidian. In order to do this, there is a need to know whenever the editor is updated. When it is, it will set off a debounced action to update the date modified so long as the user does not remove the changes by the time that the debounced function runs.
There were also some style changes made to cut down some on the whitespace that was present, but not necessary.
There was also a wording update to try to make things clearer that the lint on file change only happens when focused file changes.
Changes Made:
Lint on File Change
toLint on Focused File Change
TODO: