mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
PassThru paragraphs have latex_language; consider this when checking
previous language Fixes: #10793.
This commit is contained in:
parent
dd552fd4f8
commit
15df033bce
@ -790,6 +790,9 @@ void TeXOnePar(Buffer const & buf,
|
||||
// environment with nesting depth greater than (or equal to, but with
|
||||
// a different layout) the current one. If there is no previous
|
||||
// paragraph, the previous language is the outer language.
|
||||
// Note further that we take the outer language also if the prior par
|
||||
// is PassThru, since in that case it has latex_language, and all secondary
|
||||
// languages have been closed (#10793).
|
||||
bool const use_prev_env_language = state->prev_env_language_ != 0
|
||||
&& priorpar
|
||||
&& priorpar->layout().isEnvironment()
|
||||
@ -797,12 +800,11 @@ void TeXOnePar(Buffer const & buf,
|
||||
|| (priorpar->getDepth() == par.getDepth()
|
||||
&& priorpar->layout() != par.layout()));
|
||||
Language const * const prev_language =
|
||||
(pit != 0)
|
||||
(priorpar && !priorpar->isPassThru())
|
||||
? (use_prev_env_language ? state->prev_env_language_
|
||||
: priorpar->getParLanguage(bparams))
|
||||
: outer_language;
|
||||
|
||||
|
||||
bool const use_polyglossia = runparams.use_polyglossia;
|
||||
string const par_lang = use_polyglossia ?
|
||||
getPolyglossiaEnvName(par_language): par_language->babel();
|
||||
|
Loading…
Reference in New Issue
Block a user