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.
pirms 4 gadiem
Ben Kurtovic
6e61c99c90
Update API query example; clarify docstring
pirms 5 gadiem
Ben Kurtovic
708bee59e1
Minor cleanup
pirms 5 gadiem
Ben Kurtovic
83bcb902b8
Support manual construction of Node objects ( fixes #214 )
pirms 5 gadiem
Hugo
e457b39f32
Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgrade
pirms 5 gadiem
Ben Kurtovic
7a30e47f76
Some improvements to whitespace recognition; unit tests ( #185 ).
pirms 6 gadiem
Ben Kurtovic
7308c8055e
Not perfect, but slightly better template param space guessing ( #155 )
pirms 7 gadiem
Ben Kurtovic
68ded2f890
Add keep_template_params to Wikicode.strip_code ( #175 )
pirms 7 gadiem
Ben Kurtovic
6159171e04
Make Template.remove(keep_field=True) slightly more reasonable.
pirms 7 gadiem
Ben Kurtovic
aaffb7f66b
Update copyright for 2016.
pirms 8 gadiem
Ben Kurtovic
699d0638f6
Fix param blanking logic by Template.remove() ( #109 )
pirms 8 gadiem
Ben Kurtovic
4c2540060b
Fix preserve_spacing behavior in Template.add() on hidden keys ( #109 )
pirms 8 gadiem
Ben Kurtovic
e71e7b4ece
Update copyright years for 2015; fix whitespace in docs.
pirms 9 gadiem
Ben Kurtovic
504b8bace0
Add test code for a missing branch of Tag.wiki_markup.setter; cleanup.
pirms 9 gadiem
Ben Kurtovic
810c24e123
Don't check quotes when attributes are built from tokens.
pirms 9 gadiem
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.
pirms 10 gadiem
David Winegar
7bbeb6899a
Fix ordering of tag representation
Self-closing wiki syntax tags have incorrectly ordered wiki syntax
and padding, fixed the ordering.
pirms 10 gadiem
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.
pirms 10 gadiem
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.
pirms 10 gadiem
Ben Kurtovic
87e0079512
Take proper advantage of Sphinx's default domains.
pirms 10 gadiem
Ben Kurtovic
b997e4cd71
Support attributes quoted with '; add required quotes in value setter.
pirms 10 gadiem
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.
pirms 10 gadiem
Ben Kurtovic
08cafc0576
Raise ParserError for internal problems. Improve coverage. Cleanup.
pirms 10 gadiem
Ricordisamoa
9108d49d68
fix some typos: occurance → occurrence, parasable → parsable
pirms 10 gadiem
Ben Kurtovic
e5f17eea00
Update copyright notices for 2014.
pirms 10 gadiem
Ben Kurtovic
45aec31629
Move range/xrange compatibility code to compat.py.
pirms 10 gadiem
Ben Kurtovic
99d433c2d5
Change protocol for Node iteration; rename __iternodes__ to __children__.
pirms 10 gadiem
Ben Kurtovic
066049b46a
Update email address.
pirms 10 gadiem
Ben Kurtovic
cf90557229
Template.has() should be passed ignore_empty=False by default.
**Breaking change**; closes #51 .
pirms 10 gadiem
Ben Kurtovic
40b92358b4
Simplify parameter removal.
pirms 10 gadiem
Ben Kurtovic
f2442906db
Implement support for Template.remove() taking Parameters as arguments.
pirms 10 gadiem
Ben Kurtovic
bdfd0632b3
A couple very minor nitpicks.
pirms 10 gadiem
Ben Kurtovic
d1a7d25220
Set right context for ExternalLink.url; Wikicode.filter_external_links()
pirms 10 gadiem
Ben Kurtovic
67f1762aa4
Doc updates, and allow passing a starting context to tokenize().
pirms 10 gadiem
Ben Kurtovic
d91c65dc1f
TestExternalLink; some fixes in ExternalLink.
pirms 10 gadiem
Ben Kurtovic
5e6e5b6301
tag_defs.py -> definitions.py; more outline stuff
pirms 10 gadiem
Ben Kurtovic
8fe8b1fef5
Implement ExternalLinks as tokens and in the builder.
pirms 10 gadiem
Ben Kurtovic
0886b6fbf6
Add ExternalLink Node type.
pirms 10 gadiem
Ben Kurtovic
800bd20e39
Implement Tag.has(), Tag.get(), Tag.add(), and Tag.remove() ( closes #11 ).
pirms 10 gadiem
Ben Kurtovic
9280cb16fe
Fix behavior with quoted attrs and spaces before the =.
pirms 10 gadiem
Ben Kurtovic
53c26589ee
Some node fixes; attributes with empty values now display correctly.
pirms 10 gadiem
Ben Kurtovic
a7dda77474
Template.has_param() -> Template.has()
pirms 10 gadiem
Ben Kurtovic
7a4b1625d3
Strip self-closing tags correctly.
pirms 10 gadiem
Ben Kurtovic
4f52887e17
wiki_markup stores the markup itself instead of a bool
pirms 10 gadiem
Ben Kurtovic
de6d5074fa
Tag.showtag -> Tag.wiki_markup
pirms 11 gadiem
Ben Kurtovic
2c4bff1d68
Start test_tag; some fixes for Tags.
pirms 11 gadiem
Ben Kurtovic
b8752a5c15
test_attribute; better setters for padding attributes
pirms 11 gadiem
Ben Kurtovic
77c4df701b
Fix assorted bugs in the Tag node.
pirms 11 gadiem
Ben Kurtovic
bee74c0ced
Some doc updates.
pirms 11 gadiem
Ben Kurtovic
7d1a28a249
Support single and single-only tags like <br>.
pirms 11 gadiem