Loading src/saref_pypeline/docgen/ts2md_extractor.py +3 −3 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ def manage_ctx( def extract_run(run: Run, ctx: RunContext): # invariant: last character of last item in ctx.content is a non-blank character # invariant: last character of last item in ctx.content is a non-word character # manage opening/closing tags manage_ctx(ctx, run, Markup.STRONG) Loading @@ -312,7 +312,7 @@ def extract_run(run: Run, ctx: RunContext): text = run.text.replace(" ", " ") # extract white space before and after before, text, after = re.match(r"^(\s*)(.*?)(\s*)$", text, re.DOTALL).groups() before, text, after = re.match(r"^(\W*)(.*?)(\W*)$", text, re.DOTALL).groups() if before: ctx.buffer_blank.append(before) Loading Loading @@ -596,7 +596,7 @@ class TS2MDExtractor: ): ctx = RunContext(extract_format) # keep track of spaces, as md markup needs to be right before/after non-space characters # invariant: last character of last item in ctx.content is a non-blank character # invariant: last character of last item in ctx.content is a non-word character # We cannot use python-docx method iter_inner_content, as it only considers runs and hyperlinks. # For example elements <fldSimple> are ignored Loading src/saref_pypeline/docgen/ts_generator.py +181 −176 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
src/saref_pypeline/docgen/ts2md_extractor.py +3 −3 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ def manage_ctx( def extract_run(run: Run, ctx: RunContext): # invariant: last character of last item in ctx.content is a non-blank character # invariant: last character of last item in ctx.content is a non-word character # manage opening/closing tags manage_ctx(ctx, run, Markup.STRONG) Loading @@ -312,7 +312,7 @@ def extract_run(run: Run, ctx: RunContext): text = run.text.replace(" ", " ") # extract white space before and after before, text, after = re.match(r"^(\s*)(.*?)(\s*)$", text, re.DOTALL).groups() before, text, after = re.match(r"^(\W*)(.*?)(\W*)$", text, re.DOTALL).groups() if before: ctx.buffer_blank.append(before) Loading Loading @@ -596,7 +596,7 @@ class TS2MDExtractor: ): ctx = RunContext(extract_format) # keep track of spaces, as md markup needs to be right before/after non-space characters # invariant: last character of last item in ctx.content is a non-blank character # invariant: last character of last item in ctx.content is a non-word character # We cannot use python-docx method iter_inner_content, as it only considers runs and hyperlinks. # For example elements <fldSimple> are ignored Loading
src/saref_pypeline/docgen/ts_generator.py +181 −176 File changed.Preview size limit exceeded, changes collapsed. Show changes