Skip to content

Conversation

@QueenieZqq
Copy link
Collaborator

Update the API shape to support multiple labels per correction.

Please see the open issue for detailed discussion: #30

@QueenieZqq QueenieZqq requested a review from reillyeon November 20, 2025 22:29

`type` only exists when the proofreader object is configured with `includeCorrectionTypes = true`, while `explanation` only exists when the proofreader object is configured with `includeCorrectionExplanations = true`.

Each correction could be associated with mutliple correction type labels. For example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each correction could be associated with mutliple correction type labels. For example:
Each correction could be associated with multiple correction type labels. For example:

const original_text = "`thatd` a good amt of time!!! !" // `thatd` is the text to be corrected
const proofread_text = "`That's` a good amount of time!" // `That's` is the corrected text
```
where the correction from "thatd" to "That's" contains three types of correction - "Captilization", "Spelling" and "Punctuation". When there's only one label, the sequence will be of size 1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where the correction from "thatd" to "That's" contains three types of correction - "Captilization", "Spelling" and "Punctuation". When there's only one label, the sequence will be of size 1.
where the correction from "thatd" to "That's" contains three types of correction - "Capitalization", "Spelling" and "Punctuation". When there's only one label, the sequence will be of size 1.

unsigned long long endIndex;
DOMString correction;
CorrectionType type; // exists if proofreader.includeCorrectionTypes === true
sequence<CorrectionType> type; // exists if proofreader.includeCorrectionTypes === true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the "Full API surface in Web IDL" section below as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants