mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
* InsetSpecialChar.cpp:
make NOBREAKDASH isLetter() * Paragraph.cpp (isWord separator): handle composites with hyphens as one word (i.e., "-" is not a word separator). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37946 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2ae247285c
commit
85f486f259
@ -2850,6 +2850,14 @@ bool Paragraph::isWordSeparator(pos_type pos) const
|
||||
if (pos == size())
|
||||
return true;
|
||||
char_type const c = d->text_[pos];
|
||||
// if we have a hard hyphen (no en- or emdash),
|
||||
// we pass this to the spell checker
|
||||
if (c == '-') {
|
||||
int j = pos + 1;
|
||||
if ((j == size() || d->text_[j] != '-')
|
||||
&& (pos == 0 || d->text_[pos - 1] != '-'))
|
||||
return false;
|
||||
}
|
||||
// We want to pass the ' and escape chars to the spellchecker
|
||||
static docstring const quote = from_utf8(lyxrc.spellchecker_esc_chars + '\'');
|
||||
return (!isLetterChar(c) && !isDigitASCII(c) && !contains(quote, c));
|
||||
|
@ -342,7 +342,8 @@ void InsetSpecialChar::validate(LaTeXFeatures & features) const
|
||||
|
||||
bool InsetSpecialChar::isLetter() const
|
||||
{
|
||||
return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK;
|
||||
return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK
|
||||
|| kind_ == NOBREAKDASH;
|
||||
}
|
||||
|
||||
|
||||
@ -353,7 +354,8 @@ bool InsetSpecialChar::isLineSeparator() const
|
||||
// Paragraph::stripLeadingSpaces nukes the characters which
|
||||
// have this property. I leave the code here, since it should
|
||||
// eventually be made to work. (JMarc 20020327)
|
||||
return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR;
|
||||
return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR
|
||||
|| kind_ == SLASH;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user