mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Handle stats for French guillemets
This commit is contained in:
parent
63ff4f4431
commit
52fd21f902
@ -1024,8 +1024,25 @@ string InsetQuotes::contextMenuName() const
|
|||||||
|
|
||||||
pair<int, int> InsetQuotes::isWords() const
|
pair<int, int> InsetQuotes::isWords() const
|
||||||
{
|
{
|
||||||
//one character from the statistics perspective
|
int length = 1;
|
||||||
return std::pair<int,int>(1, 0);
|
// In PassThru, we use straight quotes otherwise we need to check for French
|
||||||
|
if (!pass_thru_) {
|
||||||
|
|
||||||
|
QuoteStyle style = (style_ == QuoteStyle::Dynamic) ? global_style_ : style_;
|
||||||
|
|
||||||
|
// in French, thin spaces are added inside double guillemets
|
||||||
|
if (prefixIs(context_lang_, "fr")
|
||||||
|
&& level_ == QuoteLevel::Primary
|
||||||
|
&& (style == QuoteStyle::Swiss
|
||||||
|
|| style == QuoteStyle::French
|
||||||
|
|| style == QuoteStyle::FrenchIN)) {
|
||||||
|
// space added by default for all formats
|
||||||
|
length++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//one or two characters from the statistics perspective
|
||||||
|
return std::pair<int,int>(length, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
Loading…
Reference in New Issue
Block a user