From 6a68ea4011349d810de26894ed4bc5ca6e2349ff Mon Sep 17 00:00:00 2001 From: Ross Kaffenberger Date: Tue, 3 Dec 2024 05:33:29 -0500 Subject: [PATCH] Upgrade to commonmarker v2 --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/views/components/markdown/base.rb | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index bf7e5e74..ffff6fe9 100644 --- a/Gemfile +++ b/Gemfile @@ -43,7 +43,7 @@ gem "sitepress-rails" # Static site generator for Rails [https://sitepress.cc/ge gem "phlex", "2.0.0.rc1" # An object-oriented view layer. [https://github.com/phlex-ruby/phlex] gem "phlex-rails", "2.0.0.rc1" # Rails integration for Phlex [https://github.com/phlex-ruby/phlex-rails] -gem "commonmarker", "< 2", require: false +gem "commonmarker", require: false gem "invisible_captcha" # Unobtrusive and flexible spam protection for Rails apps [https://github.com/markets/invisible_captcha] gem "color_conversion" # A ruby gem to perform color conversions [https://github.com/devrieda/color_conversion] gem "meta-tags" # Search Engine Optimization (SEO) for Ruby on Rails applications. [https://github.com/kpumuk/meta-tags] diff --git a/Gemfile.lock b/Gemfile.lock index 81331044..46cf7196 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -144,8 +144,8 @@ GEM code_analyzer (0.5.5) sexp_processor color_conversion (0.1.2) - commonmarker (1.1.5-arm64-darwin) - commonmarker (1.1.5-x86_64-linux) + commonmarker (2.0.1-arm64-darwin) + commonmarker (2.0.1-x86_64-linux) concurrent-ruby (1.3.4) connection_pool (2.4.1) crack (1.0.0) @@ -631,7 +631,7 @@ DEPENDENCIES bundle-audit capybara color_conversion - commonmarker (< 2) + commonmarker css_parser cuprite debug diff --git a/app/views/components/markdown/base.rb b/app/views/components/markdown/base.rb index 64f35b1d..2e441cb1 100644 --- a/app/views/components/markdown/base.rb +++ b/app/views/components/markdown/base.rb @@ -91,6 +91,8 @@ def visit(node) html_inline(node.to_html(options: @options)) in :strikethrough s { visit_children(node) } + in :escaped + visit_children(node) end end