Skip to content

ltx.js STATE_IGNORE_CDATA branch never executed #163

Description

@jinyu2022

The following switch case appears to be dead code — the STATE_IGNORE_CDATA branch never runs because nothing sets the state to STATE_IGNORE_CDATA:

case STATE_IGNORE_CDATA: {
  // if we're looping through a CDATA, fast-forward using
  // indexOf to the first end-CDATA character ]]>
  const endCDATA = data.indexOf("]]>", pos);
  if (endCDATA !== -1) {
    pos = endCDATA + 2; // target the '>' character
  }

  break;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions