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

Edit-attention fixes #13533

Merged
merged 6 commits into from
Oct 15, 2023
Merged

Conversation

missionfloyd
Copy link
Collaborator

@missionfloyd missionfloyd commented Oct 7, 2023

Currently, if the cursor is inside parentheses or angle brackets that aren't an (emphasis:1.0) block, Ctrl+Up/Down does nothing.

Fixes it by using regular expressions to more accurately check if selected text is inside an emphasis block.

If selected text is inside (parentheses) or [square brackets], as with old-style emphasis blocks, they'll be ((added)) or removed accordingly, or optionally converted to (numeric:1.1).

Checklist:

@SirVeggie
Copy link

Instead of adding more parenthesis ((thing)) around the word, maybe it could transform it into (thing:1.2) instead.

Fix square brackets multiplier
@AUTOMATIC1111 AUTOMATIC1111 merged commit a3d9b01 into AUTOMATIC1111:dev Oct 15, 2023
3 checks passed
@missionfloyd missionfloyd deleted the edit-attention-fix branch October 15, 2023 09:01
@AUTOMATIC1111
Copy link
Owner

this breaks if you attempt to edit b in (a:1.1) b (c:1.1)

@catboxanon
Copy link
Collaborator

catboxanon commented Oct 20, 2023

test <lora:name:1> doesn't function correctly when attempting to edit test as well.

The behavior is even worse if it's separated by a newline like this. Increasing/decreasing the weight of test at least twice will clear everything that follows. Fixed by 464fbcd

test ... {a bunch more text here}
<lora:name:1>

@catboxanon catboxanon mentioned this pull request Nov 3, 2023
4 tasks
@w-e-w w-e-w mentioned this pull request Dec 4, 2023
@w-e-w w-e-w mentioned this pull request Dec 16, 2023
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

Successfully merging this pull request may close these issues.

4 participants