src/parser.rb
# Only drop text from # to \0 if it exists
Only drop text from # to \0 if it exists
Only drop text from # to \ 0 if it exists
def drop_comment_portion(text)
      if text.include?('#')
        if text.include?("\0")
          idx1 = text.index('#')
          idx2 = text.index("\0", idx1)
          text = text.slice(0, idx1) + text.slice(idx2, text.size)
          if text.include?('#')
            drop_comment_portion(text)
          else
            text.gsub("\0", '')
          end
        else
          text = text.split('#').first&.strip
          text == '' ? nil : text
        end
      else
        text.gsub("\0", '')
      end
    end
def drop_comment_portion ( text ) if text . include? ( '#' ) if text . include? ( "\0" ) idx1 = text . index ( '#' ) idx2 = text . index ( "\0" , idx1 ) text = text . slice ( 0 , idx1 ) + text . slice ( idx2 , text . size ) if text . include? ( '#' ) drop_comment_portion ( text ) else text . gsub ( "\0" , '' ) end else text = text . split ( '#' ) . first &. strip text == '' ? nil : text end else text . gsub ( "\0" , '' ) end end
Only drop text from # to \0 if it exists
Only drop text from # to \ 0 if it exists
text
<not_specific>