# File lib/html5/treebuilders/base.rb, line 259 def insertText(data, parent=nil) parent = @open_elements[-1] if parent.nil? if (not(@insert_from_table) or (@insert_from_table and not TABLE_INSERT_MODE_ELEMENTS.include?(@open_elements[-1].name))) parent.insertText(data) else #We should be in the InTable mode. This means we want to do #special magic element rearranging parent, insertBefore = getTableMisnestedNodePosition parent.insertText(data, insertBefore) end end