Skip to content

Commit 79ed7e8

Browse files
committed
Publicize MAX_WORD_LEN constant
1 parent 2b43f73 commit 79ed7e8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,13 @@ const AT_COMPOUND_BEGIN: AffixingMode = 1;
384384
const AT_COMPOUND_MIDDLE: AffixingMode = 2;
385385
const AT_COMPOUND_END: AffixingMode = 3;
386386

387+
/// The maximum allowed length of a word in bytes.
388+
///
389+
/// Above this length the checker will always return `false` and the suggester will always return
390+
/// an empty output.
387391
// Nuspell limits the length of the input word:
388392
// <https://github.com/nuspell/nuspell/blob/349e0d6bc68b776af035ca3ff664a7fc55d69387/src/nuspell/dictionary.cxx#L156>
389-
const MAX_WORD_LEN: usize = 360;
393+
pub const MAX_WORD_LEN: usize = 360;
390394

391395
/// The casing of a word.
392396
// Hunspell: <https://github.com/hunspell/hunspell/blob/8f9bb2957bfd74ca153fad96083a54488b518ca5/src/hunspell/csutil.hxx#L91-L96>

0 commit comments

Comments
 (0)