Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Commits on Apr 16, 2012
  1. @peter17
  2. @peter17

    Merge pull request #40 from cburgmer/master

    peter17 authored
    Fix rendering of h[1-6] titles in text post-processing. Thanks!
  3. @cburgmer
Commits on Mar 13, 2012
  1. @peter17
Commits on Oct 27, 2011
  1. @peter17
Commits on Oct 24, 2011
  1. @peter17

    Handle \t in input; close #37

    peter17 authored
  2. @lrowe @peter17

    Add missing preprocessorParser.py

    lrowe authored peter17 committed
  3. @peter17

    Remove import of mutagen.

    authored peter17 committed
    I don't know what that was doing there.
Commits on Oct 17, 2011
  1. @lrowe

    Add missing preprocessorParser.py

    lrowe authored committed
  2. Remove import of mutagen.

    authored
    I don't know what that was doing there.
Commits on Aug 4, 2011
  1. @peter17

    Solve bugs and add tests for them.

    peter17 authored
     * 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. @peter17

    Solve 3 bugs in templates preprocessing; add tests

    peter17 authored
    Also: improve rendering of README.rst
  2. @peter17

    Add basic documentation in README.rst

    peter17 authored
    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. @peter17

    Make <body> tag generation optional (closes #31).

    peter17 authored
    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. @peter17
  2. @peter17

    Merge branch 'preprocessor' and Erik's master.

    peter17 authored
    Resolved conflict:
    	tests/__init__.py
  3. @peter17
  4. @peter17

    Correct tag balancing problem (closes #30).

    peter17 authored
    Also: improve code style in apostrophes.py
Commits on Jul 31, 2011
  1. @peter17

    Improve rendering for the given example.

    peter17 authored
    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. @peter17

    Add HTML rendering for internal links.

    peter17 authored
    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. @peter17
  3. Smash parseAllQuotes().

    authored
    All those lines--I can't look.
  4. Improve style and possibly speed of apostrophe parser.

    authored
    enumerate() instead of zip() will save copying all the split bits of the string once for each loop.
  5. Make some style (and speed) improvements to the test harness.

    authored
    Mostly, import things once, at the top, and let things have distinct names.
  6. @peter17

    Correct usage of the apostrophe parser (solve #29)

    peter17 authored
    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. @peter17

    Implement tag balancing for the HTML postprocessor

    peter17 authored
    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. @peter17

    Pass allowed tags/attributes to HTML postprocessor

    peter17 authored
    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. @peter17

    Add bold & italic rendering in text postprocessor.

    peter17 authored
    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. @peter17

    Implement HTML rendering for lists.

    peter17 authored
    The code is not perfect and needs cleaning.
  2. @peter17

    Correct implementation of bold/italic rendering.

    peter17 authored
    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. @peter17
  2. @peter17

    Fix nested templates rendering.

    peter17 authored
    They are now correctly nested in HTML.
Commits on Jul 25, 2011
  1. @peter17
Commits on Jul 21, 2011
  1. @peter17

    Improve the structure of the postprocessors.

    peter17 authored
    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. @peter17

    Add rendering for allowed and disallowed HTML tags

    peter17 authored
    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.
Something went wrong with that request. Please try again.