[nobug] Trim trailing whitespace from detected XML tasks
diff --git a/xml/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java b/xml/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java
index 45e9450..8c3625a 100644
--- a/xml/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java
+++ b/xml/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLStreamingFileTaskScanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2022 IBM Corporation and others.
+ * Copyright (c) 2001, 2023 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -147,7 +147,7 @@
markerDescription = markerDescription.substring(0,120);
}
int markerOffset = getOffset() + line.getOffset() + tagIndex;
- int markerLength = line.getLength() - tagIndex;
+ int markerLength = markerDescription.trim().length();
fNewMarkerAttributeMaps.add(createInitialMarkerAttributes(markerDescription, lineNumber, markerOffset, markerLength, taskTags[i].getPriority()));
}
}