Fix GFM markdown rendering in production
CI / Test (pull_request) Successful in 48s
Release Drafter / Update release notes draft (pull_request) Successful in 5s

kramdown-parser-gfm was only pulled in transitively by solargraph, which
lives in the development group. Production installs therefore lacked the
GFM parser, so rendering any rich-text content page raised
"Kramdown::Error: kramdown has no parser to handle the specified input
format: GFM".

Declare kramdown-parser-gfm as a direct dependency and add a regression
spec for ApplicationHelper#markdown_to_html.

Fixes #264
This commit is contained in:
raucao committed 2026-11-04 17:36:19 +04:00
1 parent 455bf93c81
commit b62d5a6035
3 files changed
+11

No files matched your search

+1
View File
@@ -43,6 +43,7 @@ gem 'flipper-ui'
gem 'gpgme', '~> 2.0.24'
gem 'zbase32', '~> 0.1.1'
gem 'kramdown'
gem 'kramdown-parser-gfm'
gem 'device_detector'
# HTTP requests
+1
View File
@@ -561,6 +561,7 @@ DEPENDENCIES
importmap-rails
jbuilder (~> 2.15)
kramdown
kramdown-parser-gfm
letter_opener
letter_opener_web
listen (~> 3.2)
+9
View File
@@ -1,4 +1,13 @@
require 'rails_helper'
describe ApplicationHelper do
describe "#markdown_to_html" do
it "renders GFM input" do
expect(helper.markdown_to_html("**bold**")).to include("<strong>bold</strong>")
end
it "renders GFM-specific syntax" do
expect(helper.markdown_to_html("~~struck~~")).to include("<del>struck</del>")
end
end
end