Actions
Defect #35892
closedRedmine::WikiFormatting::CommonMark::FormatterTest#test_footnotes fails with CommonMarker 0.23.2
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
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 @@ -"<p>This is some text<sup><a href=\"#fn1\" id=\"fnref1\">1</a></sup>.</p> <ol><li id=\"fn1\"><p>This is the foot note <a href=\"#fnref1\">↩</a></p></li></ol>" +"<p>This is some text<sup><a href=\"#fn-1\">1</a></sup>.</p> <ol><li><p>This is the foot note <a href=\"#fnref-1\" aria-label=\"Back to content\">↩</a></p></li></ol>" 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
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
Files
Related issues
Updated by Go MAEDA about 3 years ago
- Related to Feature #32424: CommonMark Markdown Text Formatting added
Updated by Marius BĂLTEANU about 3 years ago
- Assignee set to Marius BĂLTEANU
- Target version set to 5.0.0
Updated by Holger Just about 3 years ago
This seems to be related to https://github.com/gjtorikian/commonmarker/pull/148 which updated cmark-gfm to 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?
Updated by Ko Nagase about 3 years ago
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.
Updated by Marius BĂLTEANU about 3 years ago
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.
Updated by Marius BĂLTEANU about 3 years ago
- Target version changed from 5.0.0 to Candidate for next minor release
Updated by Marius BĂLTEANU over 2 years ago
- Target version changed from Candidate for next minor release to 5.0.2
Updated by Marius BĂLTEANU over 2 years ago
- Status changed from New to Resolved
- Resolution set to Fixed
Proper fix committed in r21612.
Updated by Marius BĂLTEANU over 2 years ago
- Status changed from Resolved to Closed
Actions