line_offset must be calculated before updating content.
Signed-off-by: Masatake YAMATO<
yam...@redhat.com>
Index: pygments_code_block_directive.py
===================================================================
--- pygments_code_block_directive.py (revision 2633)
+++ pygments_code_block_directive.py (working copy)
@@ -178,8 +178,8 @@
after_index -= 1
# patch mmueller end
+ line_offset = len(content[:after_index].splitlines())
content = content[after_index:]
- line_offset = len(content[:after_index].splitlines())
after_text = options.get('start-after', None)
if after_text: