class Herb::AST::HTMLTextNode

def initialize(type, location, errors, content)

def initialize(type, location, errors, content)
  super(type, location, errors)
  @content = content.force_encoding("utf-8")
end

def inspect

def inspect
  tree_inspect.rstrip.gsub(/\s+$/, "")
end

def to_hash

def to_hash
  super.merge({
    content: content,
  })
end

def tree_inspect(indent = 0)

def tree_inspect(indent = 0)
  output = +""
  output += "@ #{node_name} "
  output += location.tree_inspect
  output += "\n"
  output += inspect_errors(prefix: "│   ")
  output += %(└── content: #{content.inspect}\n)
  output += "\n"
  output.gsub(/^/, "    " * indent)
end