Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 0c2ac5c9f0758ede4f5afe120d511820f8b334a7 1 parent 4eb595c
Vladimir Ivanov authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 lib/org-ruby/html_output_buffer.rb
17 lib/org-ruby/html_output_buffer.rb
View
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.