From 54ca04d160425726762cc86fa43c4d8f76217249 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Sat, 14 Oct 2023 14:22:21 +0200 Subject: [PATCH] build-html: use newer Ruby syntax for hash literals See the `Style/HashSyntax` lint in RuboCop: https://docs.rubocop.org/rubocop/1.57/cops_style.html#stylehashsyntax --- _build/build-html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_build/build-html b/_build/build-html index fc1b4f5c0..6936968fa 100755 --- a/_build/build-html +++ b/_build/build-html @@ -70,7 +70,7 @@ class FormatPagesGenerator ]) def code(lang, src) - Pygments.highlight(src, :lexer => LANGS[lang][:lexer] || lang) + Pygments.highlight(src, lexer: LANGS[lang][:lexer] || lang) end def initialize(ksy_dir, target_dir, html_dir) @@ -135,8 +135,8 @@ class FormatPagesGenerator @all[file_id] = yaml by_cat_record = { - :id => file_id, - :ksy => ksy, + id: file_id, + ksy: ksy, } file_tags.each { |tag| @@ -196,9 +196,9 @@ class FormatPagesGenerator src = nil end { - :filename => fn, - :path => path, - :src => src, + filename: fn, + path: path, + src: src, } }.reject { |x| x[:src].nil? } @@ -271,8 +271,8 @@ class FormatPagesGenerator def usage_attr(name, attr) { - :name => name, - :doc => attr['doc'] || "get #{name.gsub(/_/, ' ')}", + name: name, + doc: attr['doc'] || "get #{name.gsub(/_/, ' ')}", } end