mirror of
https://github.com/ParticulateFlow/lammps-doc-utils.git
synced 2025-12-08 06:47:45 +00:00
Enforce l,ule or l,ole command order for RST
This commit is contained in:
@ -347,6 +347,14 @@ class Txt2Rst(TxtParser):
|
||||
def is_raw_textblock_end(self, line):
|
||||
return line.startswith('END_RST -->')
|
||||
|
||||
def order_commands(self, commands):
|
||||
if 'ule' in commands and 'l' in commands and commands.index('ule') > commands.index('l'):
|
||||
return commands
|
||||
elif 'ole' in commands and 'l' in commands and commands.index('ole') > commands.index('l'):
|
||||
return commands
|
||||
return super().order_commands(commands)
|
||||
|
||||
|
||||
class Txt2RstConverter(TxtConverter):
|
||||
def get_argument_parser(self):
|
||||
parser = argparse.ArgumentParser(description='converts a text file with simple formatting & markup into '
|
||||
|
||||
Reference in New Issue
Block a user