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] Wrong behavior when deleting asterisk in makdown files #77

Open
Bekaboo opened this issue Feb 15, 2024 · 1 comment
Open

[BUG] Wrong behavior when deleting asterisk in makdown files #77

Bekaboo opened this issue Feb 15, 2024 · 1 comment

Comments

@Bekaboo
Copy link

Bekaboo commented Feb 15, 2024

Let | be the cursor, in the following case pressing backspace will delete two asterisks in front of the cursor in markdown files, causing unbalanced italic markers:

**|** --> press backspace --> |**

Expected behavior: delete ** pair around curosr: *|*

Plugin config:

require('ultimate-autopair').setup({
  {
    '*',
    '*',
    ft = { 'markdown' },
    disable_start = true,
    disable_end = true,
  },
})
@altermo
Copy link
Owner

altermo commented Feb 21, 2024

When will it be fixed: next release (v0.7)

The reason behind this bug:
The ambiguous open/closed detector detects **|** as []|[] (if translated to non-ambiguous pairs), and this plugin has a feature where deleting the closing pair also deletes the opening pair if it is right before the closing pair ([]| > <bs> > |).

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