Skip to content

Commit

Permalink
Merge pull request asciidoctor#343 from Mogztter/issue-342-replace-wi…
Browse files Browse the repository at this point in the history
…thout-sub

resolves asciidoctor#342 replace pattern with generated code (no substitution)
  • Loading branch information
obilodeau authored Feb 18, 2020
2 parents c8ea8e1 + 6bec764 commit 716e877
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ namespace :build do
mkdir_p [File.dirname(JS_FILE), File.dirname(DIST_FILE)]
File.open(JS_FILE, 'w') do |file|
template = File.read('src/asciidoctor-revealjs.tmpl.js')
file << template.sub('//OPAL-GENERATED-CODE//', builder.to_s)
template['//OPAL-GENERATED-CODE//'] = builder.to_s
file << template
end
File.binwrite "#{JS_FILE}.map", builder.source_map

Expand Down

0 comments on commit 716e877

Please sign in to comment.