Kunal Mehta
7e5297fbe6
Drop Python 2 support
Fixes #221 .
4 年之前
Yuri Astrakhan
e66a2db0ed
add missing public items to __all__
Added a few more public classes, and sorted the __all__ value.
The Attribute and Parameter classes are not included as they can
be imported from the `mwparserfromhell.nodes.extras` without
linter complaining. They could be added to this __all__ too.
4 年之前
Ben Kurtovic
6e61c99c90
Update API query example; clarify docstring
5 年之前
Ben Kurtovic
708bee59e1
Minor cleanup
5 年之前
Ben Kurtovic
83bcb902b8
Support manual construction of Node objects ( fixes #214 )
5 年之前
Hugo
e457b39f32
Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgrade
5 年之前
Ben Kurtovic
7a30e47f76
Some improvements to whitespace recognition; unit tests ( #185 ).
6 年之前
Ben Kurtovic
7308c8055e
Not perfect, but slightly better template param space guessing ( #155 )
7 年之前
Ben Kurtovic
68ded2f890
Add keep_template_params to Wikicode.strip_code ( #175 )
7 年之前
Ben Kurtovic
6159171e04
Make Template.remove(keep_field=True) slightly more reasonable.
7 年之前
Ben Kurtovic
aaffb7f66b
Update copyright for 2016.
8 年之前
Ben Kurtovic
699d0638f6
Fix param blanking logic by Template.remove() ( #109 )
8 年之前
Ben Kurtovic
4c2540060b
Fix preserve_spacing behavior in Template.add() on hidden keys ( #109 )
8 年之前
Ben Kurtovic
e71e7b4ece
Update copyright years for 2015; fix whitespace in docs.
9 年之前
Ben Kurtovic
504b8bace0
Add test code for a missing branch of Tag.wiki_markup.setter; cleanup.
9 年之前
Ben Kurtovic
810c24e123
Don't check quotes when attributes are built from tokens.
9 年之前
David Winegar
1b3e3c3657
Change wiki tags to use style separators
For wiki syntax tables, add `wiki_style_separator` as an attribute
for the Tag node. Also reorder `closing_wiki_markup` property and tests
to match its place in the constructor.
10 年之前
David Winegar
7bbeb6899a
Fix ordering of tag representation
Self-closing wiki syntax tags have incorrectly ordered wiki syntax
and padding, fixed the ordering.
10 年之前
David Winegar
ec08001871
Tables and rows now use newline as padding
Tables and rows use newlines as padding, partly because these characters
are pretty important to the integrity of the table. They might need
to be in the preceding whitespace of inner tags instead as padding after,
not sure.
10 年之前
David Winegar
d356a570b3
Added closing_wiki_markup support to Tag node
Added support for allowing different wiki syntax for replacing the opening
and closing tags. Added for table support.
10 年之前
Ben Kurtovic
87e0079512
Take proper advantage of Sphinx's default domains.
10 年之前
Ben Kurtovic
b997e4cd71
Support attributes quoted with '; add required quotes in value setter.
10 年之前
Ben Kurtovic
8bc7ea669d
Improve test coverage; fix some node-related bugs.
* Parameters with non-integer keys can no longer be created with
showkey=False, nor have the value of this attribute be set to False
later.
* Calling Template.remove() with a Parameter object that is not part of
the template now raises ValueError instead of doing nothing.
* Added tests for HTMLEntity._unichr() being called with out-of-range
codepoints.
* Added tests for Tag.__children__() and Tag.__showtree__() involving
attributes that have no values.
10 年之前
Ben Kurtovic
08cafc0576
Raise ParserError for internal problems. Improve coverage. Cleanup.
10 年之前
Ricordisamoa
9108d49d68
fix some typos: occurance → occurrence, parasable → parsable
10 年之前
Ben Kurtovic
e5f17eea00
Update copyright notices for 2014.
10 年之前
Ben Kurtovic
45aec31629
Move range/xrange compatibility code to compat.py.
10 年之前
Ben Kurtovic
99d433c2d5
Change protocol for Node iteration; rename __iternodes__ to __children__.
10 年之前
Ben Kurtovic
066049b46a
Update email address.
10 年之前
Ben Kurtovic
cf90557229
Template.has() should be passed ignore_empty=False by default.
**Breaking change**; closes #51 .
10 年之前
Ben Kurtovic
40b92358b4
Simplify parameter removal.
10 年之前
Ben Kurtovic
f2442906db
Implement support for Template.remove() taking Parameters as arguments.
10 年之前
Ben Kurtovic
bdfd0632b3
A couple very minor nitpicks.
10 年之前
Ben Kurtovic
d1a7d25220
Set right context for ExternalLink.url; Wikicode.filter_external_links()
10 年之前
Ben Kurtovic
67f1762aa4
Doc updates, and allow passing a starting context to tokenize().
10 年之前
Ben Kurtovic
d91c65dc1f
TestExternalLink; some fixes in ExternalLink.
10 年之前
Ben Kurtovic
5e6e5b6301
tag_defs.py -> definitions.py; more outline stuff
10 年之前
Ben Kurtovic
8fe8b1fef5
Implement ExternalLinks as tokens and in the builder.
10 年之前
Ben Kurtovic
0886b6fbf6
Add ExternalLink Node type.
10 年之前
Ben Kurtovic
800bd20e39
Implement Tag.has(), Tag.get(), Tag.add(), and Tag.remove() ( closes #11 ).
10 年之前
Ben Kurtovic
9280cb16fe
Fix behavior with quoted attrs and spaces before the =.
10 年之前
Ben Kurtovic
53c26589ee
Some node fixes; attributes with empty values now display correctly.
10 年之前
Ben Kurtovic
a7dda77474
Template.has_param() -> Template.has()
10 年之前
Ben Kurtovic
7a4b1625d3
Strip self-closing tags correctly.
10 年之前
Ben Kurtovic
4f52887e17
wiki_markup stores the markup itself instead of a bool
10 年之前
Ben Kurtovic
de6d5074fa
Tag.showtag -> Tag.wiki_markup
11 年之前
Ben Kurtovic
2c4bff1d68
Start test_tag; some fixes for Tags.
11 年之前
Ben Kurtovic
b8752a5c15
test_attribute; better setters for padding attributes
11 年之前
Ben Kurtovic
77c4df701b
Fix assorted bugs in the Tag node.
11 年之前
Ben Kurtovic
bee74c0ced
Some doc updates.
11 年之前