scholarsmate commented on code in PR #1319:
URL: https://github.com/apache/daffodil-vscode/pull/1319#discussion_r2190773047


##########
src/language/providers/attributeCompletion.ts:
##########
@@ -67,6 +67,81 @@ function getCompletionItems(
   return compItems
 }
 
+/** Removes duplicate attribute suggestions from an element. Also handles 
cases where the element is prefixed with dfdl:
+ *
+ * @param originalAttributeSuggestions  The completion item list
+ * @param position position object provided by VSCode of the cursor
+ * @param document vscode object
+ * @param nsPrefix namespace prefix of the element (includes the :)
+ * @returns
+ */
+function prunedDuplicateAttributes(
+  originalAttributeSuggestions: vscode.CompletionItem[] | undefined,
+  position: vscode.Position,
+  document: vscode.TextDocument,
+  nsPrefix: string
+): vscode.CompletionItem[] | undefined {
+  if (
+    originalAttributeSuggestions == undefined ||
+    originalAttributeSuggestions.length == 0
+  ) {
+    return originalAttributeSuggestions
+  }
+
+  // Setting up stuff to create a full stirng representation of the XML element

Review Comment:
   stirng -> string



-- 
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: commits-unsubscr...@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to