mdc/lib/rendering/renderer.rb
##
# Apply regular expressions to replace inline content
# @param [String] input Text to be replaced
# @param [Boolean] alternate should alternate replacements be used
# @return [String] Text with replacements performed
Apply regular expressions to replace inline content
Apply regular expressions to replace inline content
def replace_inline_content(input, alternate = false)
      return '' if input.nil?
      result = input
      all_inline_replacements(alternate).each { |e| result.gsub!(e[0], e[1]) }
      result
    end
def replace_inline_content ( input , alternate = false ) return '' if input . nil? result = input all_inline_replacements ( alternate ) . each { | e | result . gsub! ( e [ 0 ] , e [ 1 ] ) } result end
Apply regular expressions to replace inline content
Apply regular expressions to replace inline content
Text with replacements performed
Text with replacements performed
String
input
<not_specific>
alternate
<not_specific>
<not_specific>
alternate should alternate replacements be used
alternate should alternate replacements be used