Commit 2f6ea8b1 authored by AUTOMATIC1111's avatar AUTOMATIC1111

respect keyedit_precision_attention setting when converting from old (((attention))) syntax

parent a3d9b011
......@@ -86,6 +86,8 @@ function keyupEditAttention(event) {
weight = (1 / 1.1) ** numParen;
}
weight = Math.round(weight / opts.keyedit_precision_attention) * opts.keyedit_precision_attention;
text = text.slice(0, selectionStart - numParen) + "(" + text.slice(selectionStart, selectionEnd) + ":" + weight + ")" + text.slice(selectionEnd + numParen);
selectionStart -= numParen - 1;
selectionEnd -= numParen - 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment