mbien commented on code in PR #7575:
URL: https://github.com/apache/netbeans/pull/7575#discussion_r1676982714
##########
ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java:
##########
@@ -289,9 +290,9 @@ public int beforeBreak(Document document, int offset,
JTextComponent target) thr
int indent = getLineIndent(doc, offset);
String linePrefix = doc.getText(lineBegin, offset - lineBegin);
String lineSuffix = doc.getText(offset, lineEnd + 1 - offset);
- if (linePrefix.trim().endsWith(":") && lineSuffix.trim().length() ==
0) {
+ if (linePrefix.stripTrailing().endsWith(":") && lineSuffix.isBlank()) {
Review Comment:
gonna steal this and put this into a `stripLeading()`/`stripTrailing()` rule
->
https://github.com/mbien/jackpot-inspections/commit/037b5867190b49030be754df8c18c9a6646df250
:)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists