Sha256: 2bcbd85ad096b9c78584d5d07b83f39d920864e7758a7cbca5bf5a6226084d90
Contents?: true
Size: 495 Bytes
Versions: 22
Compression:
Stored size: 495 Bytes
Contents
module Garage module Docs module AnchorBuilding def preprocess(full_document) reset full_document end def postprocess(full_document) reset full_document end private def reset @anchors = Hash.new(0) end def to_anchor(text) unique_text = text + @anchors[text].to_s @anchors[text] += 1 unique_text.gsub(/\s+/, '-').gsub(/<\/?[^>]*>/, '').downcase end end end end
Version data entries
22 entries across 22 versions & 1 rubygems