diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-28 20:55:58 -0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-11-29 04:56:03 +0000 |
commit | 129d208f9a5d54faf2eb4d944bc874fe347bfd64 (patch) | |
tree | cd219d171d0d0dc30d884966c80779b4b1aa28fd /lib/erb | |
parent | b5726892d0d9bf282d54e21e8f170f754c235456 (diff) | |
download | ruby-129d208f9a5d54faf2eb4d944bc874fe347bfd64.tar.gz |
[ruby/erb] Fix line numbers after multi-line <%#
(https://github.com/ruby/erb/pull/42)
https://github.com/ruby/erb/commit/526885923e
Diffstat (limited to 'lib/erb')
-rw-r--r-- | lib/erb/compiler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/erb/compiler.rb b/lib/erb/compiler.rb index 835f5be522..547d2c4c44 100644 --- a/lib/erb/compiler.rb +++ b/lib/erb/compiler.rb @@ -384,7 +384,7 @@ class ERB::Compiler # :nodoc: when '<%=' add_insert_cmd(out, content) when '<%#' - # commented out + out.push("\n" * content.count("\n")) # only adjust lineno end end |