Skip to content

Commit

Permalink
fix: remove default special charactor substitution for block list
Browse files Browse the repository at this point in the history
  • Loading branch information
polarlights committed Jul 4, 2020
1 parent 78220d2 commit ecab014
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/asciidoctor/confluence_publisher/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Asciidoctor
module ConfluencePublisher
VERSION = "0.1.0"
VERSION = "0.1.1"
end
end
2 changes: 1 addition & 1 deletion template/block_listing.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
%ac:structured-macro{"ac:name" => "noformat"}
- if title?
%ac:parameter{"ac:name" => "title"}= title
%ac:plain-text-body= "<![CDATA[#{content}]]>"
%ac:plain-text-body= "<![CDATA[#{raw_content}]]>"
10 changes: 10 additions & 0 deletions template/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ def confluence_supported_lang(lang)
supported.include? lang
end

# default block list with *specialcharactor* substitution, in confluence just keep it as it is.
def raw_content
return content if attr? 'subs'
orig_subs = @subs
@subs = []
result = content
@subs = orig_subs
return result
end

#--------------------------------------------------------
# block_table
#
Expand Down

0 comments on commit ecab014

Please sign in to comment.