Skip to content

Instantly share code, notes, and snippets.

@robjwells
Last active December 24, 2015 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robjwells/6762554 to your computer and use it in GitHub Desktop.
Save robjwells/6762554 to your computer and use it in GitHub Desktop.
Underline - BBEdit text filter
#!/usr/bin/env python3
import sys
bb_doc_arr = sys.stdin.readlines()
first_line = bb_doc_arr[0].rstrip('\n')
underline = '\n' + '=' * len(first_line) + '\n'
bb_doc_arr[0] = first_line + underline
print(''.join(bb_doc_arr), end='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment