From 2bb5c75695d6ab9deafacf745f4ff893c551ef70 Mon Sep 17 00:00:00 2001
From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
Date: Mon, 22 Aug 2022 17:23:35 +0200
Subject: [PATCH] Ignore previous line to table if empty line

Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
---
 src/example.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/example.py b/src/example.py
index ca6c05d..cac3e10 100644
--- a/src/example.py
+++ b/src/example.py
@@ -82,8 +82,7 @@ def parse_all_examples(txt):
             if is_example_table(line):
                 linetext = str(line.rows[0].cells[0].text)
         elif isinstance(line, str):
-            if line != '\r\n' and line != '\n':
-                linetext = line
+            linetext = line
         else:
             continue
 
@@ -102,7 +101,8 @@ def parse_all_examples(txt):
             res.append(Example(filename, new_example))
             new_example = ""
 
-        previous_line = linetext
+        if linetext != "":
+            previous_line = linetext
 
     return res
 
-- 
GitLab