From a07e5a7d1e9ee7348f33596945c5bb9f5935a691 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Tue, 14 Jul 2015 22:38:28 +0200 Subject: [PATCH] Configtool: don't try to parse help text in the loaded file. This shouldn't change functionality and is for more robustness. --- configtool/boardpanel.py | 10 ++++++++++ configtool/printerpanel.py | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/configtool/boardpanel.py b/configtool/boardpanel.py index 5425375..b7dfd68 100644 --- a/configtool/boardpanel.py +++ b/configtool/boardpanel.py @@ -300,9 +300,19 @@ class BoardPanel(wx.Panel): self.candProcessors = [] self.candClocks = [] self.tempTables = {} + gatheringHelpText = False prevLines = "" for ln in self.userBuffer: + if gatheringHelpText: + if reHelpTextEnd.match(ln): + gatheringHelpText = False + continue + + if reHelpTextStart.match(ln): + gatheringHelpText = True + continue + if ln.rstrip().endswith("\\"): prevLines += ln.rstrip()[:-1] continue diff --git a/configtool/printerpanel.py b/configtool/printerpanel.py index a790647..618908d 100644 --- a/configtool/printerpanel.py +++ b/configtool/printerpanel.py @@ -245,8 +245,19 @@ class PrinterPanel(wx.Panel): if self.parseDefineName(ln): continue + gatheringHelpText = False + prevLines = "" for ln in self.userBuffer: + if gatheringHelpText: + if reHelpTextEnd.match(ln): + gatheringHelpText = False + continue + + if reHelpTextStart.match(ln): + gatheringHelpText = True + continue + if ln.rstrip().endswith("\\"): prevLines += ln.rstrip()[:-1] continue