Skip to content

Commit

Permalink
Escape directive-like document content
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Feb 2, 2025
1 parent 83deaf4 commit 1b4b08d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion History.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
* Moved old DEVELOPERS file to CONTRIBUTING to match github conventions.
* TomDoc output now has a "Returns" heading. Issue #234 by Brian Henderson
* Metaprogrammed methods can now use the :args: directive in addition to the
:call-seq: directive. Issue #236 by Mike Moore.
\:call-seq: directive. Issue #236 by Mike Moore.
* Sections can be linked to using "@" like labels. If a section and a label
have the same name the section will be preferred. Issue #233 by Brian
Henderson.
Expand Down
2 changes: 1 addition & 1 deletion doc/rdoc/markup_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ def dummy_instance_method(foo, bar); end;
#
# Here is the <tt>:call-seq:</tt> directive given for the method:
#
# :call-seq:
# \:call-seq:
# call_seq_directive(foo, bar)
# Can be anything -> bar
# Also anything more -> baz or bat
Expand Down
4 changes: 2 additions & 2 deletions lib/rdoc/parser/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
# # :singleton-method: some_method!
#
# You can define arguments for metaprogrammed methods via either the
# :call-seq:, :arg: or :args: directives.
# \:call-seq:, :arg: or :args: directives.
#
# Additionally you can mark a method as an attribute by
# using :attr:, :attr_reader:, :attr_writer: or :attr_accessor:. Just like
Expand Down Expand Up @@ -1089,7 +1089,7 @@ def parse_constant_body container, constant, is_array_or_hash # :nodoc:

##
# Generates an RDoc::Method or RDoc::Attr from +comment+ by looking for
# :method: or :attr: directives in +comment+.
# \:method: or :attr: directives in +comment+.

def parse_comment container, tk, comment
return parse_comment_tomdoc container, tk, comment if @markup == 'tomdoc'
Expand Down

0 comments on commit 1b4b08d

Please sign in to comment.