mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 02:59:07 +08:00
markbridge 0.3.1 ships the AST normalizer from PR #67, so I dropped the temporary git pin and let the gemspec dependency take over again, bumping its floor to 0.3.1 since the renderer now needs the Normalizer API. The released API differs from the draft the code was written against, in two ways I adopted here: - `Markbridge::Normalizer.for(:discourse)` is gone. I build from `.default` and add the Discourse rules explicitly. - Moving an image-like node out of a surrounding link is no longer part of markbridge's defaults (those cover CommonMark legality only). That is now consumer policy, so `MarkdownRenderer.normalizer` adds the three `hoist_after` rules for image, upload and attachment itself, alongside the existing mention `:textify` rule. I reworded the method and link-handler comments to reflect that split, and added spec coverage through `to_markdown` for a nested link unwrapping and a linked image getting hoisted out. Mentions don't arise from BBCode and the other formats need nokogiri (absent from this gem's bundle), so the mention rule stays covered by the direct normalizer spec. [ci skip]
19 lines
519 B
Ruby
Vendored
19 lines
519 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
Gem::Specification.new do |s|
|
|
s.name = "migrations-converters"
|
|
s.version = "0.0.1"
|
|
s.summary = "Discourse migrations: public converter implementations"
|
|
s.authors = ["Discourse Team"]
|
|
s.required_ruby_version = ">= 3.4"
|
|
|
|
s.files = Dir["lib/**/*"]
|
|
|
|
s.add_dependency "migrations-core"
|
|
s.add_dependency "activesupport"
|
|
s.add_dependency "colored2"
|
|
s.add_dependency "i18n"
|
|
s.add_dependency "markbridge", ">= 0.3.1"
|
|
s.add_dependency "pg"
|
|
s.add_dependency "zeitwerk"
|
|
end
|