Vote #81644
未完了Redmine::WikiFormatting::CommonMark::FormatterTest#test_footnotes fails with CommonMarker 0.23.2
0%
説明
0.23.2:
$ bin/rails test test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:143 Run options: --seed 26353 # Running: F Failure: Redmine::WikiFormatting::CommonMark::FormatterTest#test_footnotes [/Users/maeda/redmines/redmine-trunk/test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:159]: --- expected +++ actual @@ -1 +1 @@ -"This is some text1.
" +"
This is the foot note ↩
This is some text1.
" rails test test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:143 Finished in 0.057364s, 17.4325 runs/s, 17.4325 assertions/s. 1 runs, 1 assertions, 1 failures, 0 errors, 0 skips
This is the foot note ↩
0.23.1:
$ bin/rails test test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb:143 Run options: --seed 18906 # Running: . Finished in 0.035158s, 28.4430 runs/s, 28.4430 assertions/s. 1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
journals
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
This seems to be related to https://github.com/gjtorikian/commonmarker/pull/148 which updated cmark-gfm to "0.29.0.gfm.2":https://github.com/github/cmark-gfm/releases/tag/0.29.0.gfm.2. There, they did in fact changed the footnote handling.
* The format change of the footnote IDs was comitted in https://github.com/github/cmark-gfm/pull/230
* The missing @id@ for the back references however looks strange... Maybe we have to do something different here?
--------------------------------------------------------------------------------
How about to change the test code side by regexp match as a workaround ?
Attached patch supports both CommonMarker "== 0.23.2" and "<= 0.23.1" tests.
--------------------------------------------------------------------------------
I have locked @commonmarker@ to @0.23.1@ until we find a better way to handle the footnotes because the new format doesn't affect only the tests, it affects also the logic from @sanitization_filter@ (source:trunk/lib/redmine/wiki_formatting/common_mark/sanitization_filter.rb#L70) and we need to support both ways depending on the Ruby version.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Okay, thanks for the fix!
--------------------------------------------------------------------------------
related_issues
relates,Closed,32424,CommonMark Markdown Text Formatting
Admin Redmine さんが3年以上前に更新
- カテゴリ を Gems support_45 にセット
- 対象バージョン を Candidate for next minor release_33 にセット