mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 10:39:43 +08:00
markbridge 0.4.0 gives `AST::Code` a `block` flag and sets it for `[code]` and `[pre]`, which are code blocks by definition — `[tt]` stays inline teletype and still leaves the choice to the renderer. So a single-line `[code=ruby]x = 1[/code]` inside a link label is now lifted out as a fence, exactly like the multi-line case, and the link is left with an empty label. A spec asserted the old reading, that a language attribute alone never made code a block and only multi-line code was hoisted. That premise is gone, so the three shapes — single-line with a language, single-line without, and multi-line — are now one table asserting the hoist. The unit test further down still covers code that is inline to begin with, which is the case that can stay in a label. The per-gem Gemfile.lock is gitignored, so CI resolves the newest markbridge while a local checkout keeps whatever it locked earlier. That is why this only broke in CI. The gemspec floor moves to 0.4.0, since the specs now describe that behaviour. |
||
|---|---|---|
| .. | ||
| lib/migrations | ||
| spec_helper.rb | ||