From 5ab19af7820fba58876ac86efd8cc4aa1e75b44f Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 19 Jun 2016 17:05:13 +0200 Subject: [PATCH] Skip paragraph parameters for dash conversion Some of them are directly passed to LaTeX, but for all of them a token \twohyphens or \threehyphens is not valid. This fixes bug #10243. --- lib/lyx2lyx/lyx_2_2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lyx2lyx/lyx_2_2.py b/lib/lyx2lyx/lyx_2_2.py index 34490d8dfc..25c4ba06f0 100644 --- a/lib/lyx2lyx/lyx_2_2.py +++ b/lib/lyx2lyx/lyx_2_2.py @@ -632,6 +632,10 @@ def convert_dashes(document): else: i = j continue + if len(words) > 0 and words[0] in ["\\leftindent", "\\paragraph_spacing", "\\align", "\\labelwidthstring"]: + # skip paragraph parameters (bug 10243) + i += 1 + continue while True: j = document.body[i].find("--") if j == -1: -- 2.39.2