Mercurial > evolve
comparison docs/test2rst.py @ 2958:1cb715257130
doc: add a special flag for content to ignore in the rst
The testfile to rest document convertion has a new way to ignore some commands.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 21 Sep 2017 10:45:06 +0200 |
parents | 2ddc63d13af8 |
children | ef361938dfa1 |
comparison
equal
deleted
inserted
replaced
2957:586c9ace20b3 | 2958:1cb715257130 |
---|---|
21 for line in orig.splitlines(): | 21 for line in orig.splitlines(): |
22 | 22 |
23 # Emtpy lines doesn't change output | 23 # Emtpy lines doesn't change output |
24 if not line: | 24 if not line: |
25 newlines.append(line) | 25 newlines.append(line) |
26 | |
27 # Ignore line | |
28 if line.endswith('#rest-ignore'): | |
26 continue | 29 continue |
27 | 30 |
28 codeline = line.startswith(' ') | 31 codeline = line.startswith(' ') |
29 if codeline: | 32 if codeline: |
30 if code_block_mode is False: | 33 if code_block_mode is False: |