diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 208e9d724e..6256534eb7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,3 +27,7 @@ jobs: bundler-cache: true - name: Run rubocop run: bundle exec rubocop + - name: Run herb linter + # npx should be available by default so we don't need `setup-node` action + # Don't lint erb files outside of lib as the current directory also includes vendor/bundle + run: npx @herb-tools/linter "lib/**/*.rhtml" diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..d49e5d015d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "marcoroth.herb-lsp" + ] +} diff --git a/lib/rdoc/generator/template/darkfish/_footer.rhtml b/lib/rdoc/generator/template/darkfish/_footer.rhtml index 9791b42901..620cf01484 100644 --- a/lib/rdoc/generator/template/darkfish/_footer.rhtml +++ b/lib/rdoc/generator/template/darkfish/_footer.rhtml @@ -1,5 +1,5 @@ diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml index 7376fc390e..eeae0acb03 100644 --- a/lib/rdoc/generator/template/darkfish/_head.rhtml +++ b/lib/rdoc/generator/template/darkfish/_head.rhtml @@ -1,34 +1,34 @@ - + <%= h @title %> -<%- if defined?(klass) -%> +<%- if defined?(klass) %> "> - <%- if klass.comment.empty? -%> + <%- if klass.comment.empty? %> "> - <%- else -%> + <%- else %> "> - <%- end -%> -<%- elsif defined?(file) -%> + <%- end %> +<%- elsif defined?(file) %> "> -<%- elsif @title -%> +<%- elsif @title %> <%- if @options.main_page and main_page = @files.find { |f| f.full_name == @options.main_page } then %> "> - <%- else -%> + <%- else %> - <%- end -%> -<%- end -%> + <%- end %> +<%- end %> -<%- if canonical_url = @options.canonical_root -%> +<%- if canonical_url = @options.canonical_root %> <% canonical_url = current.canonical_url if defined?(current) %> -<%- end -%> +<%- end %>