Sha256: f298a8456b14c1d797eda7d5c2a9d10d3a5bc9aa9123b66ba194022339938207

Contents?: true

Size: 644 Bytes

Versions: 17

Compression:

Stored size: 644 Bytes

Contents

require 'asciidoctor'
require 'asciidoctor/extensions'

# a postprocessor to map the nonsense
# string 'DOLLOD' back to '$'
#
# This is used for the HTML backend
# in conjunction with the code
# in 'tex_preprocessor' which maps '\$' to
# 'DOLLOD'
#
# There should be a better solution to the
# vexing proble of dealing with both $ ... $
# for mathematics and '\$' for currency. But
# this works and wil have to do for now.
#
# @jirutka: Advice?
#
module Asciidoctor::LaTeX
  # Map DOLLOD to $
  class Dollar < Asciidoctor::Extensions::Postprocessor

    def process document, output
      output = output.gsub('DOLLOD', '$')
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
asciidoctor-latex-1.5.0.17.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.16.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.15.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.14.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.13.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.12.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.11.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.10.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.9.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.8b.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.7.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.5.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.4.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.3.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.2.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.1.dev lib/asciidoctor/latex/dollar.rb
asciidoctor-latex-1.5.0.dev lib/asciidoctor/latex/dollar.rb