Permalink
Switch branches/tags
Nothing to show
Commits on Apr 16, 2012
  1. Merge pull request #40 from cburgmer/master

    peter17 committed Apr 16, 2012
    Fix rendering of h[1-6] titles in text post-processing. Thanks!
  2. Fix rendering of h[1-6] titles in text post-processing

    Christoph Burgmer
    Christoph Burgmer committed Apr 16, 2012
Commits on Mar 13, 2012
Commits on Oct 27, 2011
Commits on Oct 24, 2011
  1. Handle \t in input; close #37

    peter17 committed Oct 24, 2011
  2. Add missing preprocessorParser.py

    lrowe authored and peter17 committed Oct 17, 2011
  3. Remove import of mutagen.

    erikrose authored and peter17 committed Oct 17, 2011
    I don't know what that was doing there.
Commits on Oct 17, 2011
  1. Add missing preprocessorParser.py

    lrowe authored and erikrose committed Oct 17, 2011
  2. Remove import of mutagen.

    erikrose committed Oct 17, 2011
    I don't know what that was doing there.
Commits on Aug 4, 2011
  1. Solve bugs and add tests for them.

    peter17 committed Aug 4, 2011
     * Allow / in template names.
     * Allow wikitext in table cells
     * Allow newline inside template parameters but not at the end
Commits on Aug 3, 2011
  1. Solve 3 bugs in templates preprocessing; add tests

    peter17 committed Aug 3, 2011
    Also: improve rendering of README.rst
  2. Add basic documentation in README.rst

    peter17 committed Aug 3, 2011
    Also: move the current content of README.rst to parsers.rst to keep a
    trace of the research work we have done.
Commits on Aug 2, 2011
  1. Make <body> tag generation optional (closes #31).

    peter17 committed Aug 2, 2011
    Parsing with the 'wikitext' parser will parse and render as expected and
    do nothing more. This is useful for the inclusion of the article content in
    a larger HTML page.
    
    Parsing with the 'body' parser will also add the <body>...</body> tags
    and the interwiki links and category links. This is useful to mimic the
    behavior of MediaWiki's parser when rendering a whole article as a web
    page.
Commits on Aug 1, 2011
  1. Merge branch 'preprocessor' and Erik's master.

    peter17 committed Aug 1, 2011
    Resolved conflict:
    	tests/__init__.py
  2. Correct tag balancing problem (closes #30).

    peter17 committed Aug 1, 2011
    Also: improve code style in apostrophes.py
Commits on Jul 31, 2011
  1. Improve rendering for the given example.

    peter17 committed Jul 31, 2011
    This is adding support for void template parameter in the preprocessor
    and support for multiline table cell content in the parser and
    postprocessor.
    
    Tests added for those two cases.
Commits on Jul 30, 2011
  1. Add HTML rendering for internal links.

    peter17 committed Jul 30, 2011
    This includes rendering for categories, interwiki links and media files.
    
    Also: add a full test: parsing an article from the French Wikipedia. To
    run it, launch "python parser.py" and look at article.htm
  2. Smash parseAllQuotes().

    erikrose committed Jul 30, 2011
    All those lines--I can't look.
  3. Improve style and possibly speed of apostrophe parser.

    erikrose committed Jul 30, 2011
    enumerate() instead of zip() will save copying all the split bits of the string once for each loop.
  4. Make some style (and speed) improvements to the test harness.

    erikrose committed Jul 30, 2011
    Mostly, import things once, at the top, and let things have distinct names.
  5. Correct usage of the apostrophe parser (solve #29)

    peter17 committed Jul 30, 2011
    We had a stupid apostrophe parsing problem because we were parsing the
    whole text instead of doing that line by line as the parser expects.
    I added tests for this weird case.
    
    Also: update apostrophe.py to be closer to MediaWiki's code.
    
    Also: add docstring for the parameters of html.make_parser()
Commits on Jul 28, 2011
  1. Implement tag balancing for the HTML postprocessor

    peter17 committed Jul 28, 2011
    All open tags should be closed, in the right order (if no closing tag,
    add it). A closing tag must close an open tag (if not, remove it).
    
    Of course, the tags in "<br> and </br>" are not open/close tags, so
    they will be automagically converted to: "<br /> and <br />".
  2. Pass allowed tags/attributes to HTML postprocessor

    peter17 committed Jul 28, 2011
    This allows to choose which tags and attributes will be allowed by the
    HTML postprocessor. Each instance of it can have different lists instead
    of using predefined lists.
    
    Also: clean a little the postprocessors.
  3. Add bold & italic rendering in text postprocessor.

    peter17 committed Jul 28, 2011
    This new version of apostrophe.py allows to choose what the italic and
    bold tags will be. e.g.: <b>...</b>, <strong>...</strong> or *...*
Commits on Jul 27, 2011
  1. Implement HTML rendering for lists.

    peter17 committed Jul 27, 2011
    The code is not perfect and needs cleaning.
  2. Correct implementation of bold/italic rendering.

    peter17 committed Jul 27, 2011
    The syntax '''{{template}}''' now returns the expected value.
    
    The apostrophe postprocessor outputs HTML; that's why it was removed
    from the raw postprocessor and the other tests.
Commits on Jul 26, 2011
  1. Fix nested templates rendering.

    peter17 committed Jul 26, 2011
    They are now correctly nested in HTML.
Commits on Jul 25, 2011
Commits on Jul 21, 2011
  1. Improve the structure of the postprocessors.

    peter17 committed Jul 21, 2011
    We get rid of the need for repeating 3 times each function name.
    
    This is a first step, as we are thinking of a class-based structure.
  2. Add rendering for allowed and disallowed HTML tags

    peter17 committed Jul 21, 2011
    In the HTML preprocessor, the allowed tags are cleaned (only the allowed
    parameters are kept) and output as HTML and the disallowed tags are output as text.
    
    In the text preprocessor, the allowed tags are rendered by specific
    functions and the disallowed ones are output as text.