Sorry is invalid, hint is incorrect, isBusy flag properly resets.#334
Open
GitLuckier wants to merge 8 commits intomappingfrom
Open
Sorry is invalid, hint is incorrect, isBusy flag properly resets.#334GitLuckier wants to merge 8 commits intomappingfrom
GitLuckier wants to merge 8 commits intomappingfrom
Conversation
… regex with exact string matching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
sorryandhintwere marking the input areas as Correct. This should fix it.sorryis now marked as Invalid. TheThis pull request also fixes an issue where theisBusy` flag would sometimes not properly reset.Changes
When a user types
sorry, Lean will not mark the input as usingsorry, but will mark the theorem. This means that the message "deceleration usessorry" will appear outside the input area. In order to link the input area with this message, we look if there are anysorrymessages between the end of the current input area and the end of the previous one. Then we mark that input area as invalid. Same forhint, since it also sendssorrymessages when used.I also removed a mistake I made with the
isBusyflag being set with this function calledonDocumentChanged. This function shouldn't be in there any more, so I removed it. This fixes a bug where correct input area fields would stay permanently red, becauseisBusywasn't being set to false.renamed
client.determineProofStatus.test.tstoclient.proofStatus.test.tsto be more inclusive of functions other than determineProofStatus.Testing this PR
sorryorhint.isBusy)There are also a few automated unit tests. Most notably, this approach requires
getInputAreasto return a sorted array, I have written tests to ensure that this is always the caseCloses #328