Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Inserting an links fails if there is an existing link and this one is located after #8

@aleray

Description

@aleray

Steps to reproduce the bug:

  1. insert a link anywhere
  2. insert a link before link created in step 1

What happens?:

  • insertion fails: no link is added
  • selected text start from selection start index of step 2 and ends at selection stop index of step 1.

Comment:

there seems to be something wrong with the code starting at line 551:

551  // Get the selected URL
552  var afterMatch = MarkEdit.RegexLinkEnd.exec(state.afterSelect);
553  var urlIndex = -1;
554  var selUrl = '';
555  if (afterMatch) {
556      urlIndex = Number(afterMatch[2]) - 1;
557      selUrl = state.links[urlIndex];
558  }

Hope it helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions