-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test markdown: follow message format change
- Loading branch information
Showing
2 changed files
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2012-2022 Sutou Kouhei <[email protected]> | ||
# Copyright (C) 2012-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -170,10 +170,10 @@ def convert_p(element) | |
_("multiple ![alt]{image}s in a paragraph isn't supported.") | ||
end | ||
if child_types.include?(:img) | ||
message = | ||
format = | ||
_("![alt]{image} and other contents in a paragraph " \ | ||
"isn't supported: %{types}") | ||
raise ParseError, message % {types: child_types} | ||
raise ParseError, format % {types: child_types} | ||
end | ||
if element.options[:transparent] and child_types == [:text] | ||
element.children.first.value.chomp! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2014-2022 Sutou Kouhei <[email protected]> | ||
# Copyright (C) 2014-2024 Sutou Kouhei <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -287,7 +287,8 @@ class InlineTest < self | |
|
||
def test_unsupported | ||
image_path = fixture_path("image/png/lavie.png") | ||
message = _("![alt]{image} and other contents in a paragraph isn't supported: [:text, :img]") | ||
format = _("![alt]{image} and other contents in a paragraph isn't supported: %{types}") | ||
message = format % {types: [:text, :img]} | ||
assert_raise(Rabbit::ParseError.new(message)) do | ||
parse(<<-MARKDOWN) | ||
a ![](#{image_path}) | ||
|