Sha256: 54fc3e1b18427de7cbecb3803826ab0e1b34786b1dc76445bd4a1ded2156c510
Contents?: true
Size: 778 Bytes
Versions: 2
Compression:
Stored size: 778 Bytes
Contents
require 'asciidoctor' require 'asciidoctor/extensions' module AsciidoctorBibliography module Asciidoctor class BibliographerPostprocessor < ::Asciidoctor::Extensions::Postprocessor def process document, output puts self # byebug # content = (document.attr 'copyright') || 'Copyright Acme, Inc.' # if document.basebackend? 'html' # replacement = %(<div id="footer-text">\\1<br>\n#{content}\n</div>) # output = output.sub(/<div id="footer-text">(.*?)<\/div>/m, replacement) # elsif document.basebackend? 'docbook' # replacement = %(<simpara>#{content}</simpara>\n\\1) # output = output.sub(/(<\/(?:article|book)>)/, replacement) # end output end end end end
Version data entries
2 entries across 2 versions & 1 rubygems