Parcourir la source

Update changelog, docs.

tags/v0.4
Ben Kurtovic il y a 10 ans
Parent
révision
b4b62026f8
4 fichiers modifiés avec 16 ajouts et 8 suppressions
  1. +4
    -0
      CHANGELOG
  2. +4
    -0
      docs/changelog.rst
  3. +7
    -0
      mwparserfromhell/parser/__init__.py
  4. +1
    -8
      mwparserfromhell/utils.py

+ 4
- 0
CHANGELOG Voir le fichier

@@ -2,6 +2,10 @@ v0.4 (unreleased):

- Added a script to test for memory leaks in scripts/memtest.py.
- Added a script to do releases in scripts/release.sh.
- skip_style_tags can now be passed to mwparserfromhell.parse() (previously,
only Parser().parse() allowed it).
- Fixed a parser bug involving nested tags.
- Updated and fixed some documentation.

v0.3.3 (released April 22, 2014):



+ 4
- 0
docs/changelog.rst Voir le fichier

@@ -9,6 +9,10 @@ Unreleased

- Added a script to test for memory leaks in :file:`scripts/memtest.py`.
- Added a script to do releases in :file:`scripts/release.sh`.
- *skip_style_tags* can now be passed to :py:func:`mwparserfromhell.parse()
<.parse_anything>` (previously, only :py:meth:`.Parser.parse` allowed it).
- Fixed a parser bug involving nested tags.
- Updated and fixed some documentation.

v0.3.3
------


+ 7
- 0
mwparserfromhell/parser/__init__.py Voir le fichier

@@ -56,6 +56,13 @@ class Parser(object):
def parse(self, text, context=0, skip_style_tags=False):
"""Parse *text*, returning a :py:class:`~.Wikicode` object tree.

If given, *context* will be passed as a starting context to the parser.
This is helpful when this function is used inside node attribute
setters. For example, :py:class:`~.ExternalLink`\ 's
:py:attr:`~.ExternalLink.url` setter sets *context* to
:py:mod:`contexts.EXT_LINK_URI <.contexts>` to prevent the URL itself
from becoming an :py:class:`~.ExternalLink`.

If *skip_style_tags* is ``True``, then ``''`` and ``'''`` will not be
parsed, but instead will be treated as plain text.
"""


+ 1
- 8
mwparserfromhell/utils.py Voir le fichier

@@ -45,14 +45,7 @@ def parse_anything(value, context=0, skip_style_tags=False):
:py:class:`~.Template`, such as :py:meth:`wikicode.insert()
<.Wikicode.insert>` or setting :py:meth:`template.name <.Template.name>`.

If given, *context* will be passed as a starting context to the parser.
This is helpful when this function is used inside node attribute setters.
For example, :py:class:`~.ExternalLink`\ 's :py:attr:`~.ExternalLink.url`
setter sets *context* to :py:mod:`contexts.EXT_LINK_URI <.contexts>` to
prevent the URL itself from becoming an :py:class:`~.ExternalLink`.

If *skip_style_tags* is ``True``, then ``''`` and ``'''`` will not be
parsed, but instead will be treated as plain text.
Additional arguments are passed directly to :py:meth:`.Parser.parse`.
"""
from .parser import Parser
from .wikicode import Wikicode


Chargement…
Annuler
Enregistrer