method

format

ruby latest stable - Class: RDoc::Markup::ToTexInfo

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

format(text)
public

No documentation available.

# File lib/rdoc/markup/to_texinfo.rb, line 56
  def format(text)
    text.txt.
      gsub(/@/, "@@").
      gsub(/\{/, "@{").
      gsub(/\}/, "@}").
      # gsub(/,/, "@,"). # technically only required in cross-refs
      gsub(/\+([\w]+)\+/, "@code{\\1}").
      gsub(/\<tt\>([^<]+)\<\/tt\>/, "@code{\\1}").
      gsub(/\*([\w]+)\*/, "@strong{\\1}").
      gsub(/\<b\>([^<]+)\<\/b\>/, "@strong{\\1}").
      gsub(/_([\w]+)_/, "@emph{\\1}").
      gsub(/\<em\>([^<]+)\<\/em\>/, "@emph{\\1}")
  end