def to_html
return '' unless @_text
text = @_text.gsub(/[#{UNICODE_WHITESPACE}]\z/, '').gsub(/\A[#{UNICODE_WHITESPACE}]/, '')
glyph_table = glyph.dup
if @settings["enforce_ru_quotes"]
glyph_table[:ldquo], glyph_table[:rdquo] = glyph_table[:laquo], glyph_table[:raquo]
elsif @settings["enforce_en_quotes"]
glyph_table[:laquo], glyph_table[:raquo] = glyph_table[:ldquo], glyph_table[:rdquo]
end
glyph_table.each_pair do | ki, wi |
instance_variable_set("@#{ki}", wi)
end
process_escape_html(text) unless @settings["html"]
FORBIDDEN_NUMERIC_ENTITIES.dup.each_pair do | key, rep |
text.gsub!(/&##{key};/, self.glyph[rep])
end
process_copy_paste_clearing(text) if @settings['copypaste']
process_html_entities(text)
tags = lift_ignored_elements(text) if @skip_tags
process_spacing(text) if @settings["spacing"]
process_quotes(text) if @settings["quotes"]
process_laquo(text) if @settings["laquo"]
process_inches(text) if @settings["inches"]
process_compound_quotes(text) if (@settings["quotes"] && @settings["laquo"])
process_dash(text) if @settings["dash"]
process_emdash(text) if @settings["emdash"]
process_plusmin(text) if @settings["+-"]
process_degrees(text) if @settings["degrees"]
process_phones(text) if @settings["phones"]
process_wordglue(text) if @settings["wordglue"]
process_dashglue(text) if @settings["dashglue"]
process_initials(text) if @settings['initials']
process_ellipsises(text) if @settings["wordglue"]
process_acronyms(text) if @settings["acronyms"]
reinsert_fragments(text, tags) if @skip_tags
process_span_instead_of_nobr(text) if @settings["de_nobr"]
process_raw_output(text) if @settings["raw_output"]
text.strip
end