Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Tags are not removed from the body in Live Preview #1164

Open
kepano opened this issue Sep 12, 2024 · 5 comments
Open

Bug: Tags are not removed from the body in Live Preview #1164

kepano opened this issue Sep 12, 2024 · 5 comments
Assignees
Labels
bug Something isn't working live-preview reproducible

Comments

@kepano
Copy link

kepano commented Sep 12, 2024

Tags are not removed from the body in Live Preview. In source mode everything seems to work fine.

This problem does not occurs in Linter version 1.23.0, so I think it is related to a change since then. The examples below are from 1.26.0

The following settings are active:

  • Move all tags to frontmatter of the document: true
  • Body tag operation: remove whole tag

Input:

#people 

Output:

---
tags:
  - people
---#people 

Input:

#people 

Output:

---
tags:
  - people
---

#people 

Input:

People

#people

Output:

---
tags:
  - people
---People
Ppeopl
e
@kepano kepano added the bug Something isn't working label Sep 12, 2024
@pjkaufman
Copy link
Collaborator

Thanks for reporting this @kepano . I will have to take a closer look at this and see what is going on. Live Preview has been a real pain for me since it was introduced. Hopefully this will be an easy fix.

@pjkaufman
Copy link
Collaborator

I am able to reproduce this in my integration tests. I am not quite sure what is going on here yet. But hopefully I can get to the bottom of this.

@pjkaufman
Copy link
Collaborator

It looks like I have test case 1 fixed. I will have to check the other two cases.

@pjkaufman
Copy link
Collaborator

I have something that looks to fix both cases mentioned, but sadly it breaks proper placement of the cursor in Live Preview. So I am not sure what is going on. I will need to take a break and look at this with fresh eyes.

@pjkaufman
Copy link
Collaborator

Ok. I think I have this fixed thanks to some help. @kepano , do you use BRAT for the Linter? I am a little hesitant to make a regular release for the changes I just made for Live Preview. I am just not very familiar with codemirror. So I would prefer to make a BRAT release first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working live-preview reproducible
Projects
Status: In Progress
Development

No branches or pull requests

2 participants