浏览代码

Update changelog, docs.

tags/v0.4
Ben Kurtovic 10 年前
父节点
当前提交
b4b62026f8
共有 4 个文件被更改,包括 16 次插入8 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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


正在加载...
取消
保存