Skip to content

Commit 9b1899b

Browse files
authored
Merge pull request #564 from aycabta/use-real-error
Use ParseError that is auto-generated by KPeg
2 parents 1abe628 + 2af6e85 commit 9b1899b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rdoc/markdown.kpeg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
# with the linking `text` (usually whitespace).
350350

351351
def link_to content, label = content, text = nil
352-
raise 'enable notes extension' if
352+
raise ParseError, 'enable notes extension' if
353353
content.start_with? '^' and label.equal? content
354354

355355
if ref = @references[label] then

test/test_rdoc_markdown.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ def test_parse_note_inline
717717
def test_parse_note_no_notes
718718
@parser.notes = false
719719

720-
assert_raises RuntimeError do # TODO use a real error
720+
assert_raises RDoc::Markdown::ParseError do
721721
parse "Some text.[^1]"
722722
end
723723
end

0 commit comments

Comments
 (0)