Method: Sufia::CitationsBehaviors::CommonBehavior#clean_end_punctuation

Defined in:
app/helpers/sufia/citations_behaviors/common_behavior.rb

#clean_end_punctuation(text) ⇒ Object



8
9
10
11
12
13
# File 'app/helpers/sufia/citations_behaviors/common_behavior.rb', line 8

def clean_end_punctuation(text)
  if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
    return text[0, text.length - 1]
  end
  text
end