Skip to content

Commit ec29c6b

Browse files
authored
Merge pull request #546 from maxim-belkin/fix543
Fix Kramdown parser crash
2 parents d021e1f + f419f9c commit ec29c6b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Install GitHub Pages, Bundler, and kramdown gems
4646
run: |
47-
gem install github-pages bundler kramdown
47+
gem install github-pages bundler kramdown kramdown-parser-gfm
4848
4949
- name: Install Python modules
5050
run: |

.github/workflows/website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Install GitHub Pages, Bundler, and kramdown gems
3030
run: |
31-
gem install github-pages bundler kramdown
31+
gem install github-pages bundler kramdown kramdown-parser-gfm
3232
3333
- name: Install Python modules
3434
run: |

bin/markdown_ast.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# Use Kramdown parser to produce AST for Markdown document.
55

66
require 'kramdown'
7+
require 'kramdown-parser-gfm'
78
require 'json'
89

910
markdown = $stdin.read
10-
doc = Kramdown::Document.new(markdown)
11+
doc = Kramdown::Document.new(markdown, input: 'GFM', hard_wrap: false)
1112
tree = doc.to_hash_a_s_t
1213
puts JSON.pretty_generate(tree)

0 commit comments

Comments
 (0)