We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca16e0b commit 32ab0d1Copy full SHA for 32ab0d1
Gemfile
@@ -2,7 +2,7 @@
2
3
source 'https://rubygems.org'
4
5
-git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
+git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
7
# Synchronize with https://pages.github.com/versions
8
ruby '>=2.7.1'
bin/markdown_ast.rb
@@ -1,11 +1,12 @@
1
#!/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()
9
+markdown = $stdin.read
10
doc = Kramdown::Document.new(markdown)
11
tree = doc.to_hash_a_s_t
12
puts JSON.pretty_generate(tree)
0 commit comments