Sha256: da8d9572bf11da28734c74c1ebdb068e57698b956f79db0ab22f685274613bfe

Contents?: true

Size: 673 Bytes

Versions: 8

Compression:

Stored size: 673 Bytes

Contents

require 'asciidoctor' unless RUBY_PLATFORM == 'opal'

module Asciidoctor
  # XXX: Modifies constant defined in Asciidoctor.
  REPLACEMENTS.unshift(
    # foo --- bar ->  — 
    [/(^|\n| )---( |\n|$)/, ' — ', :none],
    # foo---bar -> —{ZERO WIDTH SPACE}
    [/(#{CG_WORD})---(?=#{CG_WORD})/, '—​', :leading],

    # foo -- bar -> &thinksp;– 
    # Note: The regexp is copied from Asciidoctor.
    [/(^|\n|\\| )--( |\n|$)/, ' – ', :none],
    # foo--bar -> –
    # Note: The regexp is copied from Asciidoctor.
    [/(#{CG_WORD})\\?--(?=#{CG_WORD})/, '–', :leading],
  )
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
asciidoctor-html5s-0.5.1 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.5.0 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.4.1 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.4.0 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.3.0 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.2.1 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.2.0 lib/asciidoctor/html5s/replacements.rb
asciidoctor-html5s-0.1.0 lib/asciidoctor/html5s/replacements.rb