aboutsummaryrefslogtreecommitdiffstats
path: root/tests/misc
Commit message (Collapse)AuthorAgeFilesLines
* Issue #365 Bold/Italic nesting fixfacelessuser2014-11-172-1/+7
| | | | | | | | | | | The logic for the current regex for strong/em and em/strong was sound, but the way it was implemented caused some unintended side effects. Whether it is a quirk with regex in general or just with Python’s re engine, I am not sure. Put basically `(\*|_){3}` causes issues with nested bold/italic. So, allowing the group to be defined, and then using the group number to specify the remaining sequential chars is a better way that works more reliably `(\*|_)\2{2}. Test from issue #365 was also added to check for this case in the future.
* Fix tail out of order issuefacelessuser2014-10-182-1/+4
| | | | | | | | | | | | This issue was discovered when dealing with nested inlines. In treeprocessors.py it was incorrectly handling tails. In short, tail elements were being inserted earlier than they were supposed to be. In order to fix this, the insertion index should be incremented by 1 so that when the tails are inserted into the parent, they will be just after the child they came from. Also added a test in nested-patterns to catch this issue.
* Better nested STRONG EM support.Waylan Limberg2014-09-262-0/+41
| | | | | | | | | Fixes #253. Thanks to @facelessuser for the tests. Although I removed a bunch of weird ones (even some that passed) from his PR (#342). For the most part, there is no definitive way for those to be parsed. So there is no point of testing for them. In most of those situations, authors should be mixing underscores and astericks so it is clear what is intended.
* Added some inline pattenr tests.Waylan Limberg2014-08-256-3/+17
| | | | | | | | | markdown/inlinepatterns.py is now at 99% coverage. I have no idea why the two remaining lines are not not covered. I it not clear to me under what circumstances this two if statements would ever evaluate to True. I'm inclined to just remove them, but perhaps there is an edge case I'm missing. I'll take another look later.
* 'http://packages.python.org/Markdown/' => ↵Waylan Limberg2014-08-212-10/+10
| | | | 'https://pythonhosted.org/Markdown/'. The former redirects to the latter anyway. Might as well point to the actual destination.
* Refactored test framework to use YAML config files rather than INI. Fixes #333.Waylan Limberg2014-08-203-7/+0
|
* Improved multiline comment parsing.Waylan Limberg2014-01-124-8/+52
| | | | | | | | | | | | | | | Fixes #257 and slightly alters comment parsing behavior. Unlike self-closing tags, a comment can contain angle brackets between the opening and closing tags. The greaterthan angle bracket at the end of the first block should not be mistaken for closing the comment. Need to actually check for a comment closing tag (`-->`). If one if not found, then the comment keeps going (to the end of the document if nessecary) just like in HTML. That last bit is a slight change from previous behavior, but should be unsurprising as that's how broswers parse html comments. And as far as I can tell, more implementations follow this behavior than any other. The ones that don't seem to be all over the place.
* No longer percent encode spaces in urls.Waylan Limberg2014-01-091-2/+2
| | | | | | | | | | | The current implementation was wrong as it also percent encoded query strings (which should be plus encoded) and calling urllib.quote on the path (and urllib.quote_plus on the query string) assumes the url is not already encoded. What if the document author pasted a url that was already encoded? She probably did not intend for `%20` to become `%2520`. Or did she? It is now clear to me why many implementation do nothing to urls. Just pass them though as-is. To bad if they are not valid HTML. HTML authors have to encodee their own urls, so I guess markdown authors have to as well.
* Only escape ESCAPED_CHARS.Waylan Limberg2014-01-092-0/+24
| | | | | | Leave all other chars prefaced by a backslash alone. Fixes #242. Not sure why I thought that I needed to add another backslash. Thanks for the report and the test case @mhubig.
* Fixed parsing of brackets within inline image titles.Darell Tan2014-01-052-0/+21
|
* HtmlBlockProcessor preserves empty linesWaylan Limberg2013-02-072-8/+74
| | | | | | | | | | | | | Partial fix for #183. This has the same effect on empty lines in code blocks as not using the html processor at all (which was eating some of the missing newlines as reported in issue #183). By doing `rsplit('\n\n')` the third newline (in each set of three) always ends up at the end of a block, rather than the begining - which it less of an issue for the html processor. Also updated tests to indicate final intended output, although they do not fully pass yet.
* Preserve whitespace in empty linesWaylan Limberg2013-02-072-0/+68
| | | | | | | | Partial fix for #183. By preserving tabs at the start of empty lines in code blocks, the parser will retain those empty lines. Still does not work consistantly if the tab is missing!? Not sure why. Also added tests.
* Enable attributes inside image referencesAdam Backstrom2013-01-272-0/+5
|
* Fixed #153. Two spaces at end of paragraph is not a linebreak.Waylan Limberg2012-10-212-6/+3
|
* Fixed #152. Spaces in links are now escaped.Waylan Limberg2012-10-211-2/+2
|
* Fixed #151. Raw html matching is now case-insensitive.Waylan Limberg2012-10-212-1/+12
|
* Fixed #106. Replaced all references to freewisdom.org (except for Yuri's ↵Waylan Limberg2012-06-284-24/+24
| | | | homepage).
* Add test for 5236a9838c580a17c3299efb97d9f41ce2a1efabCatalin Iacob2012-04-173-0/+7
|
* tests for 9852c2263ef7775d2a508a9c1721148cbf3ae258fin2012-04-112-0/+2
|
* Fixed #68. Blank line is not required after html comments.Waylan Limberg2011-12-293-2/+12
| | | | | Interestingly, the change to the misc/mismatched-tags test is inline with PHP Markdown Extra's behavior but not markdown.pl, which produces invalid html.
* Fixed #57. Multiline HTML Blocks no longer require a blank line after them.Waylan Limberg2011-12-293-2/+17
|
* Fixed #47. Improved HRProccessor.\n\nPython's re module does not support ↵Waylan Limberg2011-11-172-1/+7
| | | | atomic grouping, which was slowing the HR regex down if a long HR ended with a non HR char (casing the regex to backtrack). Therefore, we have to simulate atomic grouping. Fortunately, we only need to match end-of-line or end-of-string after the atomic group here, so it was an easy case to simulate. Just remove the '$' from the end of the regex and manualy check using m.end(). The run method was refactored while I was at it, saving us from running the regex twice for each HR.
* Fixed #31. Headers in tight lists now get inline patterns run on their ↵Waylan Limberg2011-07-212-4/+4
| | | | tails. Tests included.
* Fixed #28. Inline raw html is now enclosed in p tags. This used to work. ↵Waylan Limberg2011-06-283-2/+4
| | | | Somehow we stopped checking for a single inline html element when swapping back in raw html. Added a test. Also patched a weird (invalid) comment test. Seeing the input is not really a valid html comment - it doesn't matter what we do with it. I suppose we test it to make sure it doesn't break the parser. Actual output is not so important. As a side note, this has exposed a preexisting (unrelated) bug with the extra extension's handling of raw html. That test is failing following this fix.
* Added test for escaping chars in link urls. Closes #14 which was fixed in ↵Waylan Limberg2011-06-232-0/+10
| | | | previous commits. This addes the missing tests.
* Added our own xhtml searializer. We no longer use a xml searializer to ↵Waylan Limberg2011-06-162-4/+4
| | | | output xhtml. This fixes #9 among other bugs. The test suite even had bad tests that should have been failing. They also have been corrected.
* Fixed #21. A header and paragraph not seperated by a blank line inside a ↵Waylan Limberg2011-06-152-0/+34
| | | | list item are now parsed correctly. One of those crazy wierd edge cases that no one would ever test for, but is obvious once you see it.
* Fixed #19. Improved Start Emphasis regex.Waylan Limberg2011-06-072-1/+3
|
* Fixed #15. Setext Headers now work with any number of - or = characters.Waylan Limberg2011-06-012-1/+9
|
* Added new HTML5 block elements to known block level elementsHorst Gutmann2011-05-222-0/+30
|
* Made lazy ordered lists a settable option. The previous behavior (on) is the ↵Waylan Limberg2011-04-291-2/+2
| | | | default.
* fixed startindex reset in multiple ulRohan Jain2011-04-051-2/+2
| | | | | Now the startindex would be reset if continual unordered lists are present (tests are passed).
* Added test files for bug fix to ticket 62Gerry LaMontagne2010-09-024-0/+70
|
* Fixed Ticket 65. Lines with only a lessthan sign (<) no longer crash the ↵Waylan Limberg2010-07-142-1/+14
| | | | raw html parser. Fixed a related but I found while debugging this as well. Also added tests for both.
* Blockquoted text in the first item of a list is now placed in child p tag of theGerry LaMontagne2010-03-232-0/+55
| | | | blockquote tag. Added lists8.txt and .html for test suite to test condition.
* Fixed ticket 58. The first item of a looselist gets placed in p tags whenGerry LaMontagne2010-03-221-2/+4
| | | | | | it has a sublist. Previously, the test suite erroneously passed this condition because there was an error in the expected '.html' output file. The expected output has been corrected as well.
* Fixed Ticket 57. Lists where the first line of an item is a nested item, now ↵Waylan Limberg2010-03-192-0/+142
| | | | observe rules for using p tags. Thanks to Gerry LaMontagne for the patch.
* Fixed Ticket 53. Nested lists no longer isorder items in certain edge cases. ↵Waylan Limberg2010-03-152-0/+22
| | | | Thanks for the report and preliminary work Gerry LaMontagne.
* Fix bug with rawhtml and markdown escaping. Previously, any inline rawhtml ↵Waylan Limberg2010-03-152-1/+3
| | | | that contained text that fit markdown's escaping syntax (i.e. <x\]>) was never unescaped. Now it is. Markdown probably shouldn't be escaping before removing rawhtml in the first place, but this will do for now.
* Updated last failing test as we no longer need a demo of a failing test now ↵Waylan Limberg2010-02-221-2/+2
| | | | that the branch is merged.
* Moved test dir back out of markdown lib. We don't need to install the tests ↵Waylan Limberg2010-02-12141-0/+1649
| | | | in everyones site-packages. We just need to distrubute them in the tarball for people to run before installing etc.
* Moved remaining tests from mergeWaylan Limberg2010-02-124-32/+0
|
* Merged tests branchWaylan Limberg2010-02-12137-1620/+0
|\
| * Moves tests to a subdir of the markdown lib.Waylan Limberg2009-06-05135-1574/+0
| |
| * Initial implementation of nose testing. Still some cleanup to do, but this ↵Waylan Limberg2009-06-053-10/+7
| | | | | | | | shows the differances between the old and the new. Also left one test failing (unsignificant white space only) to demonstrate what a failing test looks like.
* | Cleanup and additional work on previous commit. NOTE: removed special ↵Waylan Limberg2010-01-033-4/+7
| | | | | | | | treatment if raw <div>s with multiple line breaks - they no longer automagicly process their content as markdown. This matches other implementations. Finished rest of code for use by an extension - to be added later.
* | Fixed Ticket 48. Quoted attributes in raw html are specificly ackowledged ↵Waylan Limberg2010-01-032-0/+8
| | | | | | | | | | | | now - allowing various arbitrary stuff (like x/html to be included without breaking the rawhtml parser. Although currently unused, the code also provides the parsed attributes as a dict. Should be useful for adding support for parsing markdown text within rawhtml in an extension.
* | Fixed ticket 44. Raw HTML now maintains original whitespace. Important ↵Waylan Limberg2010-01-032-0/+18
| | | | | | | | inside raw <pre> tags.
* | Fixed Ticket 38. With smart_emphasis turned on, emphasised text can now be ↵Waylan Limberg2009-07-212-0/+14
| | | | | | | | wrapped in punctuation without spaces and still will be converted to emphasis (ie: '[_foo_]'). Test included. Thanks for the report seanh.
* | Fixed ticket 35. Lists now work when padded with five or more spaces after ↵Waylan Limberg2009-06-172-0/+32
|/ | | | asterisk. Adjusted regex to eat all (one or more) of the spaces. While it may seem wrong (at least in the loose list case), this is how all other implementations work. And it solves a number of edge cases otherwise not accounted for in the list parser.