)]}'
{"doc/ext/utils.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"8efd0347fbac0cc74f6e6837d573f244b6335ade","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        else:"},{"line_number":65,"context_line":"            elements.append(nodes.Text(text))"},{"line_number":66,"context_line":"            text \u003d None"},{"line_number":67,"context_line":"    return nodes.paragraph(\"\", *elements)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"note \u003d lambda msg: nodes.note(\"\", paragraph(msg))"},{"line_number":70,"context_line":"hint \u003d lambda msg: nodes.hint(\"\", paragraph(msg))"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_d0337bf4","line":67,"updated":"2016-01-06 16:29:26.000000000","message":"Why aren\u0027t you using docutils itself to parse the text and construct the tree? E.g.:\n\n    from docutils import utils\n    from docutils import frontend\n    from docutils.parsers import rst\n\n    def paragraph(text):\n        parser \u003d rst.Parser()\n        settings \u003d frontend.OptionParser(components\u003d(Parser,)).get_default_values()\n        document \u003d utils.new_document(text, settings)\n        parser.parse(text, document)\n        return nodes.paragraph(\"\", *document.children)\n\nOr you might prefer:\n\n        ...\n        return document.children[0]\n\nI\u0027m not sure exactly what your preconditions are, but I think that might be a little closer to what you currently have.\n\nThis would handle *all* reST, not just the stuff you have regexes for.","commit_id":"7d71110144b619cfffa4e7e4856608ea4133bcc8"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"8efd0347fbac0cc74f6e6837d573f244b6335ade","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            elements.append(warning(msg))"},{"line_number":101,"context_line":"        else:"},{"line_number":102,"context_line":"            elements.append(paragraph(p.replace(\"\\n\", \" \")))"},{"line_number":103,"context_line":"    return elements"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_3040d733","line":103,"updated":"2016-01-06 16:29:26.000000000","message":"I think this could largely be replaced with the docutils parsing method I proposed for paragraph().","commit_id":"7d71110144b619cfffa4e7e4856608ea4133bcc8"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"5801c6ee305965984203a49a664fd9c00cef25cd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015: Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_d3f2206f","line":1,"updated":"2016-01-13 13:15:45.000000000","message":"2016","commit_id":"aa4977e76ab7d947c589958d6ea10af4beca336a"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"8f8118f380f00fff6c442437156d454bd3b88969","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015: Mirantis Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_6c8e447a","line":1,"in_reply_to":"da6ed579_d3f2206f","updated":"2016-02-24 15:23:48.000000000","message":"Done","commit_id":"aa4977e76ab7d947c589958d6ea10af4beca336a"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"67550b59552ca44e461d9e73538310b853a10d33","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Docutils is awful library. Let\u0027s apply some hacks and aliases to simplify usage"},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from docutils import frontend"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_6dddbb41","line":17,"updated":"2016-01-12 18:04:16.000000000","message":":)","commit_id":"aa4977e76ab7d947c589958d6ea10af4beca336a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"5801c6ee305965984203a49a664fd9c00cef25cd","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Docutils is awful library. Let\u0027s apply some hacks and aliases to simplify usage"},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from docutils import frontend"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_613efab9","line":17,"in_reply_to":"da6ed579_6dddbb41","updated":"2016-01-13 13:15:45.000000000","message":"I suggest do not blame any libs in comments - otherwise we have to not use them. Just do our best","commit_id":"aa4977e76ab7d947c589958d6ea10af4beca336a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"5801c6ee305965984203a49a664fd9c00cef25cd","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def definition(text, wrapper\u003dNone):"},{"line_number":45,"context_line":"    if not wrapper:"},{"line_number":46,"context_line":"        wrapper \u003d paragraph"},{"line_number":47,"context_line":"    return nodes.definition(\"\", wrapper(text))"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_36b28a95","line":46,"updated":"2016-01-13 13:15:45.000000000","message":"In this case we can put `paragraph\u0027 into function definition:\n\n def definition(text, wrapper\u003dparagraph):\n   ...\n\n\nbecause this is not an instantiation - paragraph will always be the same object. This is a case when we *can* use mutable objects in definition\n\nSo you can even use lambda:\n\n definition \u003d lambda text, **kw: nodes.definition(\"\", kw.get(\"wrapper\", paragraph)(text))","commit_id":"aa4977e76ab7d947c589958d6ea10af4beca336a"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"8f8118f380f00fff6c442437156d454bd3b88969","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def definition(text, wrapper\u003dNone):"},{"line_number":45,"context_line":"    if not wrapper:"},{"line_number":46,"context_line":"        wrapper \u003d paragraph"},{"line_number":47,"context_line":"    return nodes.definition(\"\", wrapper(text))"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_0c95f885","line":46,"in_reply_to":"da6ed579_36b28a95","updated":"2016-02-24 15:23:48.000000000","message":"Done","commit_id":"aa4977e76ab7d947c589958d6ea10af4beca336a"}]}
