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

Remove whitespace replaces inline code with code block #7

Closed
andrezgz opened this issue Jul 24, 2022 · 3 comments
Closed

Remove whitespace replaces inline code with code block #7

andrezgz opened this issue Jul 24, 2022 · 3 comments
Assignees

Comments

@andrezgz
Copy link

This plugin is great, but in one of my code notes it had messed up several parts. I have oversimplified the case to the bare minimum and share this reproducible version.

A line with several inline codes

`1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`

Two code blocks

```js
console.log(1)
```

```js
console.log(2)
```

When I execute the command "Remove whitespace in document", I get this:

A line with several inline codes

`1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, ```js
console.log(2)
```0, `10`

Two code blocks

```js
console.log(1)
```

TRIM_WHITESPACE_REPLACE_1

The inline code `9` gets replaced with the second code block, and instead of the second code block now there is a placeholder TRIM_WHITESPACE_REPLACE_1

The content of inline codes and code blocks do not change the result. It seems that the quantity and the position are what matters here. Adding more instances of inline code and code blocks, more of them get affected.

The "Skip code blocks" option is enabled, in order to avoid changing indentation whitespace inside them.

@zlovatt
Copy link
Owner

zlovatt commented Jul 24, 2022

Noted, thanks for the ticket!

This wasn't caught in my test cases; will explore.

@zlovatt zlovatt self-assigned this Jul 24, 2022
@zlovatt
Copy link
Owner

zlovatt commented Jul 24, 2022

@andrezgz this should be fixed! Sorry about that.

@andrezgz
Copy link
Author

Thanks @zlovatt! It seems to be working right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants