]> git.lyx.org Git - features.git/commitdiff
PassThru paragraphs have latex_language; consider this when checking
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 29 Apr 2018 11:18:05 +0000 (13:18 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 1 May 2018 04:56:45 +0000 (06:56 +0200)
previous language

Fixes: #10793.
(cherry picked from commit 15df033bcec5aa65cdb26b7f31b9082f3f7e05da)

src/output_latex.cpp
status.23x

index fa890f5b3c250be9b4f4c916fdfd058bfa010bb5..eccc898bb3da794e4c29eb6ba3c9ab8dea012f4e 100644 (file)
@@ -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();
index f1074f5aa06db6c85ab54319b856d47d54503937..4228e96113e686383bc2a746bbee44690406ba3f 100644 (file)
@@ -136,6 +136,8 @@ What's new
 
 - Fix polyglossia language switches for Arabic (bug 11057).
 
+- Fix language allocation after PassThru paragraphs (bug 10793).
+
 - Set correct path to (biblatex) bibliography databases that are entered
   relative to child documents (bug 11105).