Permalink
Browse files

Assigning a CSS class for HTML output was modified a little bit.

  • Loading branch information...
1 parent 4eb595c commit 0c2ac5c9f0758ede4f5afe120d511820f8b334a7 @vonavi committed Jan 10, 2013
Showing with 12 additions and 5 deletions.
  1. +12 −5 lib/org-ruby/html_output_buffer.rb
@@ -62,11 +62,18 @@ def push_mode(mode, indent)
skip_tag = ((mode_is_table?(mode) and skip_tables?) or
(mode == :src and defined? Pygments))
if HtmlBlockTag[mode] and not skip_tag
- css_class = @title_decoration
- css_class = " class=\"src\"" if mode == :src and @block_lang.empty?
- css_class = " class=\"src src-#{@block_lang}\"" if mode == :src and not @block_lang.empty?
- css_class = " class=\"example\"" if (mode == :example || mode == :inline_example)
- css_class = " style=\"text-align: center\"" if mode == :center
+ css_class = case
+ when (mode == :src and @block_lang.empty?)
+ " class=\"src\""
+ when (mode == :src and not @block_lang.empty?)
+ " class=\"src src-#{@block_lang}\""
+ when (mode == :example || mode == :inline_example)
+ " class=\"example\""
+ when mode == :center
+ " style=\"text-align: center\""
+ else
+ @title_decoration
+ end
output_indentation
@logger.debug "#{mode}: <#{HtmlBlockTag[mode]}#{css_class}>\n"

0 comments on commit 0c2ac5c

Please sign in to comment.