You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/templates/repo/diff
silverwind e24f651c86
Add template linting via djlint (#25212)
So I found this [linter](https://github.com/Riverside-Healthcare/djlint)
which features a mode for go templates, so I gave it a try and it did
find a number of valid issue, like unbalanced tags etc. It also has a
number of bugs, I had to disable/workaround many issues.

Given that this linter is written in python, this does add a dependency
on `python` >= 3.8 and `poetry` to the development environment to be
able to run this linter locally.

- `e.g.` prefixes on placeholders are removed because the linter had a
false-positive on `placeholder="e.g. cn=Search"` for the `attr=value`
syntax and it's not ideal anyways to write `e.g.` into a placeholder
because a placeholder is meant to hold a sample value.
- In `templates/repo/settings/options.tmpl` I simplified the logic to
not conditionally create opening tags without closing tags because this
stuff confuses the linter (and possibly the reader as well).
2 years ago
..
blob_excerpt.tmpl Button and color enhancements (#24989) 2 years ago
box.tmpl Button and color enhancements (#24989) 2 years ago
comment_form.tmpl Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
comment_form_datahandler.tmpl Make sure fmt catches all templates (#20979) 2 years ago
comments.tmpl Improve and fix bugs surrounding reactions (#24760) 2 years ago
compare.tmpl Use flex to align SVG and text (#25163) 2 years ago
conversation.tmpl Start cleaning the messy ".ui.left / .ui.right", improve label list page, fix stackable menu (#24393) 2 years ago
csv_diff.tmpl Fix CSV diff for added/deleted files (#21189) 2 years ago
escape_title.tmpl Switch Unicode Escaping to a VSCode-like system (#19990) 3 years ago
image_diff.tmpl Improve "new-menu" (#24465) 2 years ago
new_comment.tmpl Do not reload page after adding comments in Pull Request reviews (#13877) 4 years ago
new_review.tmpl Change form actions to fetch for submit review box (#25219) 2 years ago
options_dropdown.tmpl Expand/Collapse all changed files (#23639) 2 years ago
section_code.tmpl Add template linting via djlint (#25212) 2 years ago
section_split.tmpl Add template linting via djlint (#25212) 2 years ago
section_unified.tmpl Button and color enhancements (#24989) 2 years ago
stats.tmpl Group template helper functions, remove `Printf`, improve template error messages (#23982) 2 years ago
whitespace_dropdown.tmpl Add template linting via djlint (#25212) 2 years ago