Ben Kurtovic
86c805d59b
Don't get stuck in tags with unclosed quoted attributes ( fixes #190 ).
pirms 6 gadiem
Ben Kurtovic
cd4f90e663
Fix a rare parsing bug involving nested broken tags.
pirms 7 gadiem
Ben Kurtovic
5a99597eb3
Another C89 fix for MSVC.
pirms 7 gadiem
Ben Kurtovic
0ef6a2ffbe
Fix declarations for C89 compatibility (forgot MSVC needed that...)
pirms 7 gadiem
Ben Kurtovic
dc0b3ae446
Enable Windows builds on Python 3.6; try to fix again.
pirms 7 gadiem
Ben Kurtovic
6ad3b9fb2a
inttypes.h doesn't exist on Windows, so try using stdint.h
pirms 7 gadiem
Ben Kurtovic
2593675651
Remove stdbool.h from avl_tree since MSVC doesn't like it.
pirms 7 gadiem
Ben Kurtovic
6ee61789da
Fix compilation issue on Travis since GCC uses C90 by default there.
pirms 7 gadiem
Ben Kurtovic
8a9c9224be
Speed up parsing deeply nested syntax by caching bad routes ( fixes #42 )
Also removed the max cycles stop-gap, allowing much more complex pages
to be parsed quickly without losing nodes at the end
Also fixes #65 , fixes #102 , fixes #165 , fixes #183
Also fixes #81 (Rafael Nadal parsing bug)
Also fixes #53 , fixes #58 , fixes #88 , fixes #152 (duplicate issues)
pirms 7 gadiem
Ben Kurtovic
aaffb7f66b
Update copyright for 2016.
pirms 8 gadiem
Ben Kurtovic
8835ca313a
Don't preserve context when popping template key stack ( fixes #142 , hopefully).
pirms 8 gadiem
Ben Kurtovic
61b6b98470
Fix two parser bugs involving wikitable error handling.
pirms 8 gadiem
Ben Kurtovic
651b63b7f6
Windows fix ( #126 )
pirms 8 gadiem
Ben Kurtovic
23d97583bf
Fix regression in C tokenizer ( #125 )
pirms 8 gadiem
Ben Kurtovic
460199488f
Fix a couple sign compare issues.
pirms 8 gadiem
Ben Kurtovic
90bd12dd47
Fix a C tokenizer crash when parsing is interrupted ( fixes #97 )
pirms 8 gadiem
Ben Kurtovic
4f3ab48375
Edge cases involving wikilink -> external link fallback ( fixes #120 )
pirms 8 gadiem
Ben Kurtovic
8e7a600b51
Fix use-after-free bug.
pirms 9 gadiem
Ben Kurtovic
8963c1f683
Fix Textbuffer_reverse()
pirms 9 gadiem
Ben Kurtovic
1357da119d
Finish improved Unicode support for PEP 393.
pirms 9 gadiem
Ben Kurtovic
c1d4feea66
Py_UNICODE -> Unicode everywhere; bugfix for PEP 393.
pirms 9 gadiem
Ben Kurtovic
5eac0ab16f
More PEP 393 work; update Textbuffer interface and usage.
pirms 9 gadiem
Ben Kurtovic
2072a10b67
More reworking of CTokenizer Unicode support (incomplete)
pirms 9 gadiem
Ben Kurtovic
2a3a978986
Incomplete code for C tokenizer textbuffer.
pirms 9 gadiem
Ben Kurtovic
f16c7e25ca
Fully fix parsing templates with blank names, I hope ( #111 )
pirms 9 gadiem
John Vandenberg
ab0a58121a
Delay loading of pure Python tokenizer
pirms 9 gadiem
Ben Kurtovic
40fed91806
Fix C tokenizer leaking memory.
pirms 9 gadiem
Ben Kurtovic
7345a3742e
Fix a thread safety issue involving route state.
pirms 9 gadiem
Ben Kurtovic
2005efd309
Split up C tokenizer into tag_data, tok_parse, tok_support, tokens.
pirms 9 gadiem
Ben Kurtovic
0e547aa416
Begin splitting up C tokenizer.
pirms 9 gadiem
Ben Kurtovic
a8c0ff3f29
Remove stdint.h include for MSVC 2008.
pirms 9 gadiem
Ben Kurtovic
dad042bc2c
Fix C warnings in MSVC.
pirms 9 gadiem
Ben Kurtovic
1d5bbbe25b
Disallow < and > in wikilink titles/template names ( fixes #104 )
pirms 9 gadiem
Ben Kurtovic
e71e7b4ece
Update copyright years for 2015; fix whitespace in docs.
pirms 9 gadiem
Ben Kurtovic
a00c645bd8
Fix handling of tag closes within <nowiki> ( fixes #89 ).
pirms 9 gadiem
Ben Kurtovic
a15f6172c0
Minor bugfix.
pirms 9 gadiem
Ben Kurtovic
9fc4b909e1
Refactor a lot of table error recovery code.
pirms 9 gadiem
Ben Kurtovic
fb261450d8
Port tokenizer updates to C.
pirms 9 gadiem
Ben Kurtovic
640005dbb2
Tokenizer cleanup; make inline table syntax invalid as it should be.
pirms 9 gadiem
Ben Kurtovic
913ff590c8
Cleanup; add a missing test.
pirms 9 gadiem
Ben Kurtovic
5d29bff918
Remove an incorrect usage of Py_XDECREF().
pirms 9 gadiem
Ben Kurtovic
457355d4bf
Remove try/except that is impossible to fail inside of.
pirms 9 gadiem
Ben Kurtovic
7489253e32
Break at 80 cols for most lines.
pirms 9 gadiem
Ben Kurtovic
810c24e123
Don't check quotes when attributes are built from tokens.
pirms 9 gadiem
David Winegar
1a4c88e11f
Correctly handle no table endings
Tests were not correctly testing the situations without a table close.
Fixed tests and then fixed tokenizers for failing tests. Also refactored
pytokenizer to more closely match the ctokenizer by only holding the
`_parse` methods in the try blocks and no other code.
pirms 10 gadiem
David Winegar
c802b1f814
Change context to uint64_t
One-line fix
pirms 10 gadiem
David Winegar
c63108039b
Fix C code to make declarations before statements
Python 3.4 compiles C extensions with the
`-Werror=declaration-after-statement` flag that enforces C90 more
strictly than previous versions. Move all statements after declarations
to make sure this extension builds on 3.4.
pirms 10 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
213c105666
Table tags are no longer self-closing
Table tags no longer self-closing. Rows and cells now contain their
contents. Also refactored out an `emit_table_tag` method.
Note: this will require changes to the Tag node and possibly the builder,
those changes will be in the next commit.
pirms 10 gadiem
David Winegar
0128b1f78a
Implement CTokenizer for tables
CTokenizer is completely implemented in this commit - it didn't
make much sense to me to split it up. All tests passing, memory test
shows no leaks on Linux.
pirms 10 gadiem