Skip to content

Commit d2879cf

Browse files
committed
language-server: fix detection of space/tab after see asdoc comment
1 parent ac8ebc7 commit d2879cf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

language-server/src/main/java/com/as3mxml/vscode/asdoc/VSCodeASDocComment.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ public void compile(boolean useMarkdown) {
139139
{
140140
int at = line.indexOf('@');
141141
// look for nearest space or tab character
142-
int after = line.indexOf(' ', at + 1);
143-
int tabAfter = line.indexOf('\t', at + 1);
144-
if (tabAfter != -1 && tabAfter < after) {
142+
int spaceAfter = line.indexOf(" ", at + 1);
143+
int tabAfter = line.indexOf("\t", at + 1);
144+
int after = spaceAfter;
145+
if (tabAfter != -1 && (spaceAfter == -1 || spaceAfter > tabAfter)) {
145146
after = tabAfter;
146147
}
147148
if (after == -1) {

0 commit comments

Comments
 (0)