Fix Ruby style
authorMaxim Belkin <maxim.belkin@gmail.com>
Tue, 24 Nov 2020 22:41:26 +0000 (16:41 -0600)
committerFrançois Michonneau <francois.michonneau@gmail.com>
Mon, 7 Dec 2020 15:59:14 +0000 (16:59 +0100)
Gemfile
bin/markdown_ast.rb

diff --git a/Gemfile b/Gemfile
index 46eedf74876a6c4d5c4d584a515b36ca2d0994a0..41c97a9a57d879681825f8a65434b4752d0716b0 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,7 @@
 
 source 'https://rubygems.org'
 
-git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
+git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
 
 # Synchronize with https://pages.github.com/versions
 ruby '>=2.7.1'
index c3fd0b5e2982319b5c1f6f85358572d52bef5235..4fdb684344a5fe8d4c725e5a65df93d2cf0bbd58 100755 (executable)
@@ -1,11 +1,12 @@
 #!/usr/bin/env ruby
+# frozen_string_literal: true
 
 # Use Kramdown parser to produce AST for Markdown document.
 
-require "kramdown"
-require "json"
+require 'kramdown'
+require 'json'
 
-markdown = STDIN.read()
+markdown = $stdin.read
 doc = Kramdown::Document.new(markdown)
 tree = doc.to_hash_a_s_t
 puts JSON.pretty_generate(tree)