diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-27 01:30:18 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-27 01:30:18 +0000 |
commit | 95e213d3542034e0fd2613de6990a7ddfe5718ca (patch) | |
tree | 76ec64fccb338dbcbc4d3f07c2f494ef9b7fe1ff /lib/rdoc/generator | |
parent | 41fb243684f60e231fc77ec54752fe4e844523d5 (diff) |
Merge rdoc-6.1.0.beta1.
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/generator')
-rw-r--r-- | lib/rdoc/generator/markup.rb | 14 | ||||
-rw-r--r-- | lib/rdoc/generator/template/json_index/js/navigation.js | 7 |
2 files changed, 5 insertions, 16 deletions
diff --git a/lib/rdoc/generator/markup.rb b/lib/rdoc/generator/markup.rb index fef982d378..41e132450d 100644 --- a/lib/rdoc/generator/markup.rb +++ b/lib/rdoc/generator/markup.rb @@ -65,16 +65,6 @@ end class RDoc::MethodAttr - @add_line_numbers = false - - class << self - ## - # Allows controlling whether <tt>#markup_code</tt> adds line numbers to - # the source code. - - attr_accessor :add_line_numbers - end - ## # Prepend +src+ with line numbers. Relies on the first line of a source # code listing having: @@ -106,7 +96,7 @@ class RDoc::MethodAttr ## # Turns the method's token stream into HTML. # - # Prepends line numbers if +add_line_numbers+ is true. + # Prepends line numbers if +options.line_numbers+ is true. def markup_code return '' unless @token_stream @@ -126,7 +116,7 @@ class RDoc::MethodAttr end src.gsub!(/^#{' ' * indent}/, '') if indent > 0 - add_line_numbers(src) if RDoc::MethodAttr.add_line_numbers + add_line_numbers(src) if options.line_numbers src end diff --git a/lib/rdoc/generator/template/json_index/js/navigation.js b/lib/rdoc/generator/template/json_index/js/navigation.js index e41268123e..43c5118abd 100644 --- a/lib/rdoc/generator/template/json_index/js/navigation.js +++ b/lib/rdoc/generator/template/json_index/js/navigation.js @@ -59,9 +59,8 @@ Navigation = new function() { } break; case 13: //Event.KEY_RETURN: - if (this.$current) - e.preventDefault(); - this.select(this.$current); + if (this.$current) e.preventDefault(); + this.select(this.$current); break; } if (e.ctrlKey && e.shiftKey) this.select(this.$current); @@ -80,7 +79,7 @@ Navigation = new function() { var go = function() { if (!_this.moveTimeout) return; _this[isDown ? 'moveDown' : 'moveUp'](); - _this.moveTimout = setTimeout(go, 100); + _this.moveTimeout = setTimeout(go, 100); } this.moveTimeout = setTimeout(go, 200); } |