Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita31b366

Browse files
committed
fix coderay -HTML option
1 parentd9ee837 commita31b366

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

‎Changes.textile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ h2. Changes in 1.1
3333
* The @Debug@ scanner maps unknown token kinds to @:unknown@ (to avoid creating Symbols based on possibly unsafe input)
3434
* The @Raydebug@ scanner highlights unknown token kinds as @:plain@
3535
* @Plugin@ does not warn about fallback when default is defined
36+
* Fixed @HTML@ encoder when output is a StringIO (eg. when using @-HTML@)
3637
* @HTML@ encoder will not warn about unclosed token groups at the end of the stream
3738
* @Debug@ encoder refactored; use @DebugLint@ if you want strict checking now
3839
* @Debug@ encoder will not warn about errors in the token stream

‎lib/coderay/encoders/html.rb‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,15 @@ def finish options
197197
@last_opened=nil
198198
end
199199

200-
@out.extendOutput
201-
@out.css=@css
202-
ifoptions[:line_numbers]
203-
Numbering.number!@out,options[:line_numbers],options
200+
if@out.respond_to?:to_str
201+
@out.extendOutput
202+
@out.css=@css
203+
ifoptions[:line_numbers]
204+
Numbering.number!@out,options[:line_numbers],options
205+
end
206+
@out.wrap!options[:wrap]
207+
@out.apply_title!options[:title]
204208
end
205-
@out.wrap!options[:wrap]
206-
@out.apply_title!options[:title]
207209

208210
ifdefined?(@real_out) &&@real_out
209211
@real_out <<@out

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp