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.
The existing camel case limit (8) comes from the hard-coded length of
SpellerImpl::check_inf
. I changed thecheck
function to no longer return when reaching the end of the array, instead reusing the last element of the array for all subsequent checks.When a
CompoundInfo * cpi
is passed, reusing ci pointers meanscpi->first_incorrect
can change as well. Like the current implementation we return, settingcpi->count
to zero.The proposed change means we can accept large camel case words with correct spelling. Providing suggestions for incorrect spellings would require a different approach: making the
check_inf
array as well as some insuggest.cpp
larger (this seems to work with minimal changes) or dynamically sized.Things I still want to look at/change:
check_camelcase
function