# frozen_string_literal: true

#  Copyright (c) 2019, Pfadibewegung Schweiz. This file is part of
#  hitobito and licensed under the Affero General Public License version 3
#  or later. See the COPYING file at the top-level directory or at
#  https://github.com/hitobito/hitobito.

module HelpTextsHelper

  def help_text_renderer
    @help_text_renderer ||= HelpTexts::Renderer.new(self)
  end

  def format_help_text_body(help_text)
    help_text_renderer.safe_html(help_text.body)
  end
end
