lib/erbook/to_xhtml.rb
##
# Returns a digest of the given string that
# will not be altered by String#to_xhtml.
#
Returns a digest of the given string that
will not be altered by String#to_xhtml.
Returns a digest of the given string that will not be altered by String#to_xhtml .
def calc_digest input
    Digest::SHA1.hexdigest(input.to_s).
    gsub(/\d/, 'z\&z')
  end
def calc_digest input Digest :: SHA1 . hexdigest ( input . to_s ) . gsub ( / \d / , 'z\&z' ) end
Returns a digest of the given string that
will not be altered by String#to_xhtml.
Returns a digest of the given string that will not be altered by String#to_xhtml .
# XXX: surround all digits with alphabets so #      Maruku doesn't change them into HTML
input