Merge branch 'newlines' into daniel/threepidinvites-2

pull/977/head
Daniel Wagner-Hall 9 years ago
commit 6596802ed7

@ -206,4 +206,3 @@ paths:
title: PresenceEvent
allOf:
- "$ref": "definitions/event.yaml"

@ -71,10 +71,11 @@ def main():
run_through_template("tmp/howto.rst")
rst2html("tmp/full_spec.rst", "gen/specification.html")
rst2html("tmp/howto.rst", "gen/howtos.html")
cleanup_env()
if "--nodelete" not in sys.argv:
cleanup_env()
if __name__ == '__main__':
if len(sys.argv) > 1:
if len(sys.argv) > 1 and sys.argv[1:] != ["--nodelete"]:
# we accept no args, so they don't know what they're doing!
print "gendoc.py - Generate the Matrix specification as HTML."
print "Usage:"

@ -76,10 +76,10 @@ def main(input_module, file_stream=None, out_dir=None, verbose=False):
return " "*indent + input
def wrap(input, wrap=80, initial_indent=""):
if len(input) == 0:
return initial_indent
input_lines = input.split('\n\n')
wrapper = TextWrapper(initial_indent=initial_indent, width=wrap)
return wrapper.fill(input)
output_lines = [wrapper.fill(line) for line in input_lines]
return '\n\n'.join(output_lines)
# make Jinja aware of the templates and filters
env = Environment(

Loading…
Cancel
Save