Skip to content

Commit

Permalink
Fix for issue #41
Browse files Browse the repository at this point in the history
  • Loading branch information
doekman committed Apr 13, 2024
1 parent 402dc34 commit 0427d9a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ok-show.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ def set_indent(self, max_pos, max_width):
self.indent = 0

class rx:
heading = re.compile('^[ \t]*(#)')
whitespace = re.compile('^[ \t]*$')
comment = re.compile('(^[ \t]+)?(?<!\S)(?=#)(?!#\{)')
named_line = re.compile('^[ \t]*([A-Za-z_][-A-Za-z0-9_.]*)[ \t]*:')
faulty_named_line = re.compile('^[ \t]*([^:"][^ :"]{0,19})[ \t]*:')
ansi_len = re.compile('\x1b\[.*?m')
heading = re.compile(r'^[ \t]*(#)')
whitespace = re.compile(r'^[ \t]*$')
comment = re.compile(r'(^[ \t]+)?(?<!\S)(?=#)(?!#\{)')
named_line = re.compile(r'^[ \t]*([A-Za-z_][-A-Za-z0-9_.]*)[ \t]*:')
faulty_named_line = re.compile(r'^[ \t]*([^:"][^ :"]{0,19})[ \t]*:')
ansi_len = re.compile(r'\x1b\[.*?m')

def get_env(name, default, legal_values=None):
val = os.environ[name] if name in os.environ else default
Expand Down Expand Up @@ -363,7 +363,7 @@ def main():
main()


'''
r'''
Parsing of comments is not yet perfect. It's also quite complicated.
See also:
http://www.apeth.com/nonblog/stories/textmatebundle.html
Expand Down

1 comment on commit 0427d9a

@secretGeek
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good work.

Please sign in to comment.