kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
610 stars 30 forks source link

Bug: Removing external links erases everything between #189

Closed b-camphart closed 9 months ago

b-camphart commented 10 months ago

Versions Longform version: 2.0.3 Obsidian version: 1.3.7 OS [e.g. macOS, Windows, iOS, Android]: Windows Theme: Minimal Other plugins that you think might be relevant here:

Describe the bug When two external links are in the same paragraph, the text between them, and the second link, is completely removed from the output.

To Reproduce Steps to reproduce the behavior:

  1. Create a new scene with the following content:
    
    [[David]] and [[Ashley]] are two wikilinks to characters.

David and Ashley are two external links to the same characters.

2. Make sure the "Remove Links" step is part of the scene compilation
3. Click Compile

**Expected behavior**
The scene should be compiled to:
```markdown
David and Ashley are two wikilinks to characters.

David and Ashley are two external links to the same characters.

Screenshots Capture

Additional context Add any other context about the problem here.

kevboh commented 10 months ago

Regex leak! Should be a simple fix. Thanks.

b-camphart commented 10 months ago

@kevboh this was automatically closed due to #191 being merged, but it wasn't actually resolved. 191 will just make it easier to fix