app/operations/full_text/extract_text_content.rb
# Extract the actual text of provided full-text content based
# on the provided content type.
#
# @param ["html", "markdown", "text"] kind
# @param [String] content
# @return [String, nil]
Extract the actual text of provided full-text content based
on the provided content type.
Extract the actual text of provided full - text content based on the provided content type .
def call(kind:, content:, **)
      case kind
      when "html"
        parse_html content
      when "markdown"
        parse_markdown content
      when "text"
        content
      end.then do |text_content|
        text_content.squish.strip if text_content.kind_of?(String) && text_content.present?
      end
    end
def call ( kind : , content : , ** ) case kind when "html" parse_html content when "markdown" parse_markdown content when "text" content end . then do | text_content | text_content . squish . strip if text_content . kind_of? ( String ) && text_content . present? end end
Extract the actual text of provided full-text content based
on the provided content type.
Extract the actual text of provided full - text content based on the provided content type .
None
String, nil
kind
content
None