refactoring of InlineParser#treated_as_node_end()