From 54aa11efa8b1be2c5d20402890d6d2fa90aa19a8 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sun, 14 Mar 2021 18:26:19 +0900 Subject: [ruby/rdoc] Disable other notations in tags https://github.com/ruby/rdoc/commit/0cd3b55210 --- lib/rdoc/markup/attr_span.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/rdoc/markup/attr_span.rb') diff --git a/lib/rdoc/markup/attr_span.rb b/lib/rdoc/markup/attr_span.rb index 63aace60d2..6fe939fe7d 100644 --- a/lib/rdoc/markup/attr_span.rb +++ b/lib/rdoc/markup/attr_span.rb @@ -7,16 +7,22 @@ class RDoc::Markup::AttrSpan ## # Creates a new AttrSpan for +length+ characters - def initialize(length) + def initialize(length, exclusive) @attrs = Array.new(length, 0) + @exclusive = exclusive end ## # Toggles +bits+ from +start+ to +length+ def set_attrs(start, length, bits) + updated = false for i in start ... (start+length) - @attrs[i] |= bits + if (@exclusive & @attrs[i]) == 0 + @attrs[i] |= bits + updated = true + end end + updated end ## -- cgit v1.2.3