From de0ef1a9dfd9f966ad7e667788f3e333944d959e Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 28 Mar 2019 03:33:35 +0000 Subject: [DOC] fix markups [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 82 ++++++++++++++++++++++++++++++++++---------------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index 88d051904f..4c18e5315c 100644 --- a/re.c +++ b/re.c @@ -521,11 +521,11 @@ static VALUE rb_reg_str_with_term(VALUE re, int term); * * Returns a string containing the regular expression and its options (using the * (?opts:source) notation. This string can be fed back in to - * Regexp::new to a regular expression with the same semantics as - * the original. (However, Regexp#== may not return true when - * comparing the two, as the source of the regular expression itself may - * differ, as the example shows). Regexp#inspect produces a - * generally more readable version of rxp. + * Regexp::new to a regular expression with the same semantics as the + * original. (However, Regexp#== may not return true + * when comparing the two, as the source of the regular expression + * itself may differ, as the example shows). Regexp#inspect produces + * a generally more readable version of rxp. * * r1 = /ab+c/ix #=> /ab+c/ix * s1 = r1.to_s #=> "(?ix-m:ab+c)" @@ -726,11 +726,11 @@ rb_reg_casefold_p(VALUE re) * call-seq: * rxp.options -> integer * - * Returns the set of bits corresponding to the options used when creating this - * Regexp (see Regexp::new for details. Note that additional bits - * may be set in the returned options: these are used internally by the regular - * expression code. These extra bits are ignored if the options are passed to - * Regexp::new. + * Returns the set of bits corresponding to the options used when + * creating this Regexp (see Regexp::new for details. Note that + * additional bits may be set in the returned options: these are used + * internally by the regular expression code. These extra bits are + * ignored if the options are passed to Regexp::new. * * Regexp::IGNORECASE #=> 1 * Regexp::EXTENDED #=> 2 @@ -884,10 +884,9 @@ make_regexp(const char *s, long len, rb_encoding *enc, int flags, onig_errmsg_bu /* * Document-class: MatchData * - * MatchData encapsulates the result of matching a Regexp against - * string. It is returned by Regexp#match and - * String#match, and also stored in a global variable returned by - * Regexp.last_match. + * MatchData encapsulates the result of matching a Regexp against + * string. It is returned by Regexp#match and String#match, and also + * stored in a global variable returned by Regexp.last_match. * * Usage: * @@ -917,16 +916,16 @@ make_regexp(const char *s, long len, rb_encoding *enc, int flags, onig_errmsg_bu * * == Global variables equivalence * - * Parts of last MatchData (returned by Regexp.last_match) are also + * Parts of last MatchData (returned by Regexp.last_match) are also * aliased as global variables: * - * * $~ is Regexp.last_match; - * * $& is Regexp.last_match[0]; + * * $~ is Regexp.last_match; + * * $& is Regexp.last_match[0]; * * $1, $2, and so on are - * Regexp.last_match[i] (captures by number); - * * $` is Regexp.last_match.pre_match; - * * $' is Regexp.last_match.post_match; - * * $+ is Regexp.last_match[-1] (the last capture). + * Regexp.last_match[i] (captures by number); + * * $` is Regexp.last_match.pre_match; + * * $' is Regexp.last_match.post_match; + * * $+ is Regexp.last_match[-1] (the last capture). * * See also "Special global variables" section in Regexp documentation. */ @@ -2009,12 +2008,12 @@ match_ary_aref(VALUE match, VALUE idx, VALUE result) * mtch[range] -> array * mtch[name] -> str or nil * - * Match Reference -- MatchData acts as an array, and may be - * accessed using the normal array indexing techniques. mtch[0] - * is equivalent to the special variable $&, and returns the - * entire matched string. mtch[1], mtch[2], and so - * on return the values of the matched backreferences (portions of the - * pattern between parentheses). + * Match Reference -- MatchData acts as an array, and may be accessed + * using the normal array indexing techniques. mtch[0] + * is equivalent to the special variable $&, and returns + * the entire matched string. mtch[1], + * mtch[2], and so on return the values of the matched + * backreferences (portions of the pattern between parentheses). * * m = /(.)(.)(\d+)(\d)/.match("THX1138.") * m #=> # @@ -3287,11 +3286,11 @@ rb_reg_match2(VALUE re) * rxp.match(str) -> matchdata or nil * rxp.match(str,pos) -> matchdata or nil * - * Returns a MatchData object describing the match, or - * nil if there was no match. This is equivalent to retrieving the - * value of the special variable $~ following a normal match. - * If the second parameter is present, it specifies the position in the string - * to begin the search. + * Returns a MatchData object describing the match, or + * nil if there was no match. This is equivalent to + * retrieving the value of the special variable $~ + * following a normal match. If the second parameter is present, it + * specifies the position in the string to begin the search. * * /(.)(.)(.)/.match("abc")[2] #=> "b" * /(.)(.)/.match("abc", 1)[2] #=> "c" @@ -3418,7 +3417,7 @@ rb_reg_match_p(VALUE re, VALUE str, long pos) /* * Document-method: compile * - * Alias for Regexp.new + * Alias for Regexp.new */ /* @@ -3763,11 +3762,12 @@ rb_reg_s_union(VALUE self, VALUE args0) * Regexp.union(pat1, pat2, ...) -> new_regexp * Regexp.union(pats_ary) -> new_regexp * - * Return a Regexp object that is the union of the given - * patterns, i.e., will match any of its parts. The patterns - * can be Regexp objects, in which case their options will be preserved, or - * Strings. If no patterns are given, returns /(?!)/. - * The behavior is unspecified if any given pattern contains capture. + * Return a Regexp object that is the union of the given + * patterns, i.e., will match any of its parts. The + * patterns can be Regexp objects, in which case their + * options will be preserved, or Strings. If no patterns are given, + * returns /(?!)/. The behavior is unspecified if any + * given pattern contains capture. * * Regexp.union #=> /(?!)/ * Regexp.union("penzance") #=> /penzance/ @@ -4029,9 +4029,9 @@ re_warn(const char *s) /* * Document-class: Regexp * - * A Regexp holds a regular expression, used to match a pattern - * against strings. Regexps are created using the /.../ and - * %r{...} literals, and by the Regexp::new + * A Regexp holds a regular expression, used to match a pattern + * against strings. Regexps are created using the /.../ + * and %r{...} literals, and by the Regexp::new * constructor. * * :include: doc/regexp.rdoc -- cgit v1.2.3