diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3bf09f4..f87f283 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,9 +2,15 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: 9136088a246768144165fcc3ecc3d31bb686920a # frozen: v3.3.0
+ rev: 38b88246ccc552bffaaf54259d064beeee434539 # frozen: v4.0.1
hooks:
+ - id: check-case-conflict
+ - id: check-symlinks
- id: check-yaml
+ - id: end-of-file-fixer
+ - id: mixed-line-ending
+ - id: trailing-whitespace
+ exclude: '^(README.md|tests/testdata/expected/.*)$'
- repo: local
hooks:
- id: rustfmt
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e42eb3c..8b0b377 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -39,7 +39,7 @@ Code is formatted with [rustfmt](https://github.com/rust-lang/rustfmt) using the
In addition, all default [clippy](https://github.com/rust-lang/rust-clippy) checks on the latest stable Rust compiler must also pass.
Both of these are enforced through CI using GitHub actions.
-> **💡 Tip: install pre-commit hooks**
+> **💡 Tip: install pre-commit hooks**
>
> This codebase is set up with the [pre-commit framework](https://pre-commit.com/) to automatically run the appropriate checks locally whenever you commit.
> Assuming you [have pre-commit installed](https://pre-commit.com/#install), all you need to do is run `pre-commit install` once to get this set up.
diff --git a/README.md b/README.md
index 4f7e127..eff9482 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ WARNING:
the docs directory.
Instead of editing README.md, edit the corresponding Markdown files in the
- docs directory and run generate.sh.
+ docs directory and run generate.sh.
To add new sections, create new files under docs and add these to _combined.md
@@ -58,7 +58,7 @@ If you built from source, upgrade by running `cargo install obsidian-export` aga
The main interface of *obsidian-export* is the `obsidian-export` CLI command.
As a text interface, this must be run from a terminal or Windows PowerShell.
-It is assumed that you have basic familiarity with command-line interfaces and that you set up your `PATH` correctly if you installed with `cargo`.
+It is assumed that you have basic familiarity with command-line interfaces and that you set up your `PATH` correctly if you installed with `cargo`.
Running `obsidian-export --version` should print a version number rather than giving some kind of error.
>
@@ -101,7 +101,7 @@ Using the `--start-at` argument, you can export just a subset of your vault.
Given the following vault structure:
````
-my-obsidian-vault
+my-obsidian-vault
├── Notes/
├── Books/
└── People/
@@ -285,7 +285,7 @@ In addition, all default [clippy](https://github.com/rust-lang/rust-clippy) chec
Both of these are enforced through CI using GitHub actions.
>
- > **💡 Tip: install pre-commit hooks**
+ > **💡 Tip: install pre-commit hooks**
>
> This codebase is set up with the [pre-commit framework](https://pre-commit.com/) to automatically run the appropriate checks locally whenever you commit.
> Assuming you [have pre-commit installed](https://pre-commit.com/#install), all you need to do is run `pre-commit install` once to get this set up.
diff --git a/docs/.obsidian/config b/docs/.obsidian/config
index dc8a0e8..d102c54 100644
--- a/docs/.obsidian/config
+++ b/docs/.obsidian/config
@@ -1 +1 @@
-{"theme":"moonstone","pluginEnabledStatus":{"Open in default app":true,"file-explorer":true,"global-search":true,"switcher":true,"graph":true,"backlink":true,"command-palette":true,"markdown-importer":false,"word-count":true,"tag-pane":false,"daily-notes":false,"slides":false,"open-with-default-app":true,"random-note":false,"page-preview":true,"zk-prefixer":false,"starred":false,"outline":true,"templates":false,"workspaces":false},"isSidebarCollapsed":false,"isRightSidedockCollapsed":true,"lastOpenSidebarTab":"File explorer","useTab":false,"showLineNumber":true,"foldHeading":true,"foldIndent":true,"vimMode":true,"newFileLocation":"current","hotkeys":{"switcher:open":[{"modifiers":["Mod"],"key":" "}],"app:go-back":[{"modifiers":["Mod"],"key":"o"}],"app:go-forward":[{"modifiers":["Mod"],"key":"i"}],"editor:toggle-bold":[{"modifiers":["Mod"],"key":"8"}],"editor:toggle-italics":[{"modifiers":["Mod"],"key":"-"}],"editor:toggle-highlight":[{"modifiers":["Mod"],"key":"="}],"editor:delete-paragraph":[],"editor:focus-top":[{"modifiers":["Alt"],"key":"k"}],"editor:focus-bottom":[{"modifiers":["Alt"],"key":"j"}],"editor:focus-left":[{"modifiers":["Alt"],"key":"h"}],"editor:focus-right":[{"modifiers":["Alt"],"key":"l"}],"workspace:split-horizontal":[{"modifiers":["Alt"],"key":"s"}],"workspace:split-vertical":[{"modifiers":["Alt"],"key":"v"}],"workspace:toggle-pin":[{"modifiers":["Alt"],"key":"t"}],"graph:open":[],"backlink:open-backlinks":[{"modifiers":["Alt"],"key":"b"}],"workspace:close":[{"modifiers":["Alt"],"key":"w"}],"editor:swap-line-up":[{"modifiers":["Mod","Shift"],"key":"K"}],"editor:swap-line-down":[{"modifiers":["Mod","Shift"],"key":"J"}],"outline:open":[{"modifiers":["Alt"],"key":"o"}],"app:toggle-left-sidebar":[{"modifiers":["Alt"],"key":","}],"app:toggle-right-sidebar":[{"modifiers":["Alt"],"key":"."}],"graph:open-local":[{"modifiers":["Alt"],"key":"g"}]},"lastOpenRightSidedockTab":"Backlinks","sideDockWidth":{"left":300,"right":301},"fileSortOrder":"alphabetical","promptDelete":false,"readableLineLength":true,"alwaysUpdateLinks":true,"spellcheck":true,"strictLineBreaks":true,"spellcheckDictionary":[],"autoPairMarkdown":false,"autoPairBrackets":false,"showFrontmatter":true,"enabledPlugins":["todoist-sync-plugin"],"defaultViewMode":"preview","obsidianCss":false}
\ No newline at end of file
+{"theme":"moonstone","pluginEnabledStatus":{"Open in default app":true,"file-explorer":true,"global-search":true,"switcher":true,"graph":true,"backlink":true,"command-palette":true,"markdown-importer":false,"word-count":true,"tag-pane":false,"daily-notes":false,"slides":false,"open-with-default-app":true,"random-note":false,"page-preview":true,"zk-prefixer":false,"starred":false,"outline":true,"templates":false,"workspaces":false},"isSidebarCollapsed":false,"isRightSidedockCollapsed":true,"lastOpenSidebarTab":"File explorer","useTab":false,"showLineNumber":true,"foldHeading":true,"foldIndent":true,"vimMode":true,"newFileLocation":"current","hotkeys":{"switcher:open":[{"modifiers":["Mod"],"key":" "}],"app:go-back":[{"modifiers":["Mod"],"key":"o"}],"app:go-forward":[{"modifiers":["Mod"],"key":"i"}],"editor:toggle-bold":[{"modifiers":["Mod"],"key":"8"}],"editor:toggle-italics":[{"modifiers":["Mod"],"key":"-"}],"editor:toggle-highlight":[{"modifiers":["Mod"],"key":"="}],"editor:delete-paragraph":[],"editor:focus-top":[{"modifiers":["Alt"],"key":"k"}],"editor:focus-bottom":[{"modifiers":["Alt"],"key":"j"}],"editor:focus-left":[{"modifiers":["Alt"],"key":"h"}],"editor:focus-right":[{"modifiers":["Alt"],"key":"l"}],"workspace:split-horizontal":[{"modifiers":["Alt"],"key":"s"}],"workspace:split-vertical":[{"modifiers":["Alt"],"key":"v"}],"workspace:toggle-pin":[{"modifiers":["Alt"],"key":"t"}],"graph:open":[],"backlink:open-backlinks":[{"modifiers":["Alt"],"key":"b"}],"workspace:close":[{"modifiers":["Alt"],"key":"w"}],"editor:swap-line-up":[{"modifiers":["Mod","Shift"],"key":"K"}],"editor:swap-line-down":[{"modifiers":["Mod","Shift"],"key":"J"}],"outline:open":[{"modifiers":["Alt"],"key":"o"}],"app:toggle-left-sidebar":[{"modifiers":["Alt"],"key":","}],"app:toggle-right-sidebar":[{"modifiers":["Alt"],"key":"."}],"graph:open-local":[{"modifiers":["Alt"],"key":"g"}]},"lastOpenRightSidedockTab":"Backlinks","sideDockWidth":{"left":300,"right":301},"fileSortOrder":"alphabetical","promptDelete":false,"readableLineLength":true,"alwaysUpdateLinks":true,"spellcheck":true,"strictLineBreaks":true,"spellcheckDictionary":[],"autoPairMarkdown":false,"autoPairBrackets":false,"showFrontmatter":true,"enabledPlugins":["todoist-sync-plugin"],"defaultViewMode":"preview","obsidianCss":false}
diff --git a/docs/.obsidian/workspace b/docs/.obsidian/workspace
index 775c383..cd657c0 100644
--- a/docs/.obsidian/workspace
+++ b/docs/.obsidian/workspace
@@ -107,4 +107,4 @@
"Usage.md",
"License.md"
]
-}
\ No newline at end of file
+}
diff --git a/docs/.obsidian/workspaces.json b/docs/.obsidian/workspaces.json
index 9e26dfe..0967ef4 100644
--- a/docs/.obsidian/workspaces.json
+++ b/docs/.obsidian/workspaces.json
@@ -1 +1 @@
-{}
\ No newline at end of file
+{}
diff --git a/docs/_edit-warning.md b/docs/_edit-warning.md
index c60d430..ed36171 100644
--- a/docs/_edit-warning.md
+++ b/docs/_edit-warning.md
@@ -6,7 +6,7 @@ WARNING:
the docs directory.
Instead of editing README.md, edit the corresponding Markdown files in the
- docs directory and run generate.sh.
+ docs directory and run generate.sh.
To add new sections, create new files under docs and add these to _combined.md
diff --git a/docs/usage-advanced.md b/docs/usage-advanced.md
index 6e1817d..de168f2 100644
--- a/docs/usage-advanced.md
+++ b/docs/usage-advanced.md
@@ -112,4 +112,4 @@ With these hooks in place, links to both notes as well as file attachments shoul
[gitignore]: https://git-scm.com/docs/gitignore
[hugo-relative-linking]: https://notes.nick.groenen.me/notes/relative-linking-in-hugo/
[hugo]: https://gohugo.io
-[markdown render hooks]: https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks
+[markdown render hooks]: https://gohugo.io/getting-started/configuration-markup#markdown-render-hooks
diff --git a/docs/usage-basic.md b/docs/usage-basic.md
index 7cae68d..19c7798 100644
--- a/docs/usage-basic.md
+++ b/docs/usage-basic.md
@@ -3,7 +3,7 @@
The main interface of _obsidian-export_ is the `obsidian-export` CLI command.
As a text interface, this must be run from a terminal or Windows PowerShell.
-It is assumed that you have basic familiarity with command-line interfaces and that you set up your `PATH` correctly if you installed with `cargo`.
+It is assumed that you have basic familiarity with command-line interfaces and that you set up your `PATH` correctly if you installed with `cargo`.
Running `obsidian-export --version` should print a version number rather than giving some kind of error.
> If you downloaded a pre-built binary and didn't put it a location referenced by `PATH` (for example, you put it in `Downloads`), you will need to provide the full path to the binary instead.
@@ -44,7 +44,7 @@ Using the `--start-at` argument, you can export just a subset of your vault.
Given the following vault structure:
```
-my-obsidian-vault
+my-obsidian-vault
├── Notes/
├── Books/
└── People/
diff --git a/tests/testdata/input/main-samples/bulb.svg b/tests/testdata/input/main-samples/bulb.svg
index 3eb07fd..ecbfb2e 100644
--- a/tests/testdata/input/main-samples/bulb.svg
+++ b/tests/testdata/input/main-samples/bulb.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
diff --git a/tests/testdata/input/main-samples/section-ref-a.md b/tests/testdata/input/main-samples/section-ref-a.md
index 0c1840b..e2f3955 100644
--- a/tests/testdata/input/main-samples/section-ref-a.md
+++ b/tests/testdata/input/main-samples/section-ref-a.md
@@ -4,4 +4,4 @@
## This is a header
-This is a block ^dda637
\ No newline at end of file
+This is a block ^dda637
diff --git a/tests/testdata/input/same-filename-different-directories/dir2/Note.md b/tests/testdata/input/same-filename-different-directories/dir2/Note.md
index 0a2138a..8709600 100644
--- a/tests/testdata/input/same-filename-different-directories/dir2/Note.md
+++ b/tests/testdata/input/same-filename-different-directories/dir2/Note.md
@@ -1 +1 @@
-Note in dir2.
\ No newline at end of file
+Note in dir2.