aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extensions
Commit message (Collapse)AuthorAgeFilesLines
* Better handling of backticks in tables (#524)Isaac Muse2017-01-112-1/+40
| | | | At some point the logic of counting backticks and determining if they are odd or even was used to parse a row's text into cells. Unfortunately this approach broke expected code parsing logic in a table. We essentially traded one bug for another. This fixes table backtick handling and restores sane backtick logic while preserving existing fixes. (issue #449)
* lists are not tables - fixes #478 (#507)Adam Wood2016-10-262-3/+13
|
* No need to test the same thing twice.Waylan Limberg2016-09-232-5/+2
| | | | Related to #498.
* Merge branch 'master' of https://github.com/waylan/Python-MarkdownWaylan Limberg2016-09-233-5/+8
|\
| * Fix table alignment when seperator contains spaces (#489)eph2016-08-151-4/+4
| | | | | | | | | | | | | | | | | | | | * Fix table alignment when seperator contains spaces eg. seperator like "------ | :----- | :----: | -----: | ------" * Update tests for table * Delete the newline at the end of tables.html
| * Fix another issue with attribute lists (with multiple ‘=’ signs)Dmitry Shachnev2016-06-132-0/+3
| |
* | Don't allow equal signs in attr_list keys.Waylan Limberg2016-09-232-1/+4
|/ | | | | | This will probably not result in the output intending by the author, but the syntax would be incorrect so the author needs to edit the document anyway. We just need to ensure the parser does not crash here. Fixes #498.
* Attribute lists are not permitted to contain newlines. Fixes #482.Waylan Limberg2016-06-122-1/+5
|
* Add a failing testcase for issue #440.Dmitry Shachnev2015-11-072-1/+22
|
* Ensure InlinePatterns don't drop newlines.Waylan Limberg2015-11-062-1/+6
| | | | | | Drppoed the non-greedy quantifier from the end of the inlinePatterns as it served no useful purpose and was actually (in very rare edge cases) causing newlines to be dropped. FIxes #439. Thanks to @munificent for the report.
* Fixed handling of table cell splitMustafa Haddara2015-10-243-2/+85
|
* Fix infinite loop #430facelessuser2015-09-042-1/+12
| | | | | | | | | This should fix the remaining corner cases that can cause infinite loops. Previous iterations did not account for scenarios where the “end” index was less than the “start” index. If the “end” index is ever less than or equal to the “start” index, the “end” will be adjusted to to be “start” + 1 allow the full range to be extracted and replaced.
* Fix find footnote placeholder to recurseGustav Tiger2015-08-292-0/+18
|
* Add a test to make sure quotes processor does not touch code blocksDmitry Shachnev2015-06-192-2/+2
|
* tests: Add a failing case for `<<Hello>>` to smarty testDmitry Shachnev2015-06-152-0/+2
|
* updated tables testpieterprovoost2015-04-062-2/+11
|
* added support for zero row tablespieterprovoost2015-04-051-0/+3
|
* smarty: Add back special case for decade abbreviationsDmitry Shachnev2015-03-182-6/+6
| | | | | | | | | | The previous version did not work, and was incorrectly removed as part of 85ad18071d619251. In the new version, use lookbehind search for \w instead of \b, so that it works. Update the tests accordingly. Fixes #399 (except parts that we can't fix). Thanks @gandaro for the report.
* No `=` in key or value of attr lists.Waylan Limberg2015-02-242-1/+19
| | | | Fixes #389. Thanks for the report @lazka.
* Preserve order of nested headers in TOCWaylan Limberg2014-12-303-0/+53
| | | | | | | | | Fixes #380. The TOC replacement is now seperate from building the TOC, which allows us to iter through the doc in order rather than with the non-order-preserving interparent pethod. This is almost a complete refactor of the run method. Also cleaned up the config stuff. Thanks to @colewerner for the report and test case.
* Issue #368: Fix Markdown in raw HTML stops workingfacelessuser2014-11-192-3/+24
| | | | | | | Originally there was an infinite loop issue that was patched in issue #308. Unfortunately, it was fixed all the way. This fix patches the infinite loop fix to only add an offset to the `right_listindex` when it is in a infinite loop scenario.
* Code Blocks must always be AtomicStringsWaylan Limberg2014-09-082-2/+11
| | | | | | | | | | | | | | | | | | Fixes #340. The "inline" TreeProcessor runs before the "prettify" TreeProcessor, but the "smarty" TreeProcessor (wich is just another instance of `InlineProcessor`) runs after the "prettify" TreeProcessor. The problem was that the "prettify" TreeProcessor was losing the AtomicString quality of the text of code blocks (any operation on a string creates a new string. When that string is an AtomicString, the new string must explicitly be declared as an AtomicString. As the "prettify" TreeProcessor cleans up newlines on code blocks, it was changing the AtomicString to a normal string. And as `InlineProcessor` identifies what elements to skip solely by whether the text is an AtomicString, the "smarty" instance was running on code blocks. Importantly, I added a test of code blocks and spans for smarty, so this shouldn't break again.
* More updates to test configs.Waylan Limberg2014-08-293-0/+22
| | | | | | | | | | | | | | The last few extensions were updated to accept dicts/**kwargs as configs and more tests were updated. Also updated extra to actually accept configs. Note that extra requires an extra level of dicts. First you need to indicate tha the settings are for extra, then, which extension extra wraps. I'm not crazy abount this, bit not sur ehow else to do it without making all the configs a global attribute on the Markdown class to that any extention can access any other extensions config settings. I don't think we wnat to do that. Also updated extra to use dot notation for the sub-extensions.
* All extension tests now use python dot notation.Waylan Limberg2014-08-292-28/+28
| | | | | | | | | | All named extensions now use python dot notation in the tests - including all builtin extensions (eg: 'extra' => 'markdown.extensions.extra'). This is in anticipation of #336. Note there are a few tests (in the error tests) that will still need updating, but not till we make the change as they will test for the new error message.
* Refactored test framework to use YAML config files rather than INI. Fixes #333.Waylan Limberg2014-08-202-44/+78
|
* Fixed an old typo in the smarty extension and added a test case.Martin Altmayer2014-08-112-1/+3
|
* 100% test coverage of admonitionsWaylan Limberg2014-07-102-0/+2
|
* smarty: add support for angled quotesDmitry Shachnev2014-06-193-1/+6
| | | | See <http://en.wikipedia.org/wiki/Guillemet>.
* Add failing unit test for smarty: ellipsis before close double quote ↵Lawrence Kesteloot2014-05-312-0/+3
| | | | generates opening double quote.
* Merge pull request #311 from mitya57/masterWaylan Limberg2014-05-261-1/+1
|\ | | | | Make smarty extension work together with attr_list
| * Add smarty to extensions for attr_list testDmitry Shachnev2014-05-061-1/+1
| | | | | | | | To make it easier to notice (and fix) the failure.
* | Fix issue308 and fix (unrelated) failure to break out of nest loop.ryneeverett2014-05-212-1/+14
|/
* Add a (failing) test for Smarty extension.Dmitry Shachnev2014-02-132-1/+3
|
* Fix some tests failuresDmitry Shachnev2014-02-121-1/+1
|
* tables_and_attr_list testryneeverett2014-01-113-0/+25
|
* Issue #52ryneeverett2013-10-142-6/+57
|
* toc: insert `&para;` instead of raw unicode characterDmitry Shachnev2013-09-291-4/+4
|
* Add tests for the previous two commitsDmitry Shachnev2013-09-253-10/+10
|
* Ensure each term on def list maintains its own loose status.Waylan Limberg2013-09-022-1/+22
| | | | | | Previously, the code was ignoring whether this was a new term when determining whether the currect item should be loose or not. Fixes #243. Thanks for the report @Anomareh.
* Some fixes requested by @waylan, cleanup and tests improvementsDmitry Shachnev2013-07-272-2/+11
|
* Add smarty extension, based on SmartyPants libraryDmitry Shachnev2013-07-263-0/+38
|
* Added support for attr_lists on definition list terms.Waylan Limberg2013-07-193-2/+22
| | | | | | | | Like headers (h1-6) dt's can only be on one line, so we need to use the header regex on dt's. This was implemented after considering a recent [discussion](http://six.pairlist.net/pipermail/markdown-discuss/2013-July/002859.html) on the markdown mailing list. Prior to that discussion, I never considered that it was impossable to set block level attrs on dt's. Now it is.
* Allow inline attr_lists at end of header.Waylan Limberg2013-07-192-2/+2
| | | | | | | | | | A header can be only one line - so unlike other block level elements, a attr_list must be at th eend of the line. To disingush it from an inline attr_list on the last child in a header, we must require at least one space before th eblock-level attrt_list. Always intended it to work that way. Not sure how I missed that before. At least we're testing for it now.
* Attr_List Extension now also supports nested ol's.Waylan Limberg2013-07-192-1/+43
| | | | | | | | | | Not sure how I missed that when committing ea4af0d. Also as a side-effect, this fixes #230 - which brought my previous oversight to my attention. Thanks for the report @divisoryang. Also added some tests - including tests of list items without attr_lists. Sometimes I forget to test markup that does not use an extension when an extension is enabled. That's what resulted in #230 being reported.
* Attr_List Extension now support attr_lists on nested lists.Waylan Limberg2013-06-162-1/+23
| | | | | | A list item with a nested list complicates were the attr_list can be. Fixes #218. Thanks for the report @jpzimmer.
* Updated toc tests.Waylan Limberg2013-02-192-2/+2
|
* adding test for out of order headlinesbenjaoming2013-02-183-0/+16
|
* Allow capitalized Admonition title.Waylan Limberg2013-02-121-1/+1
| | | | | If an adminition title is capitalized, the html class on the div should still be lowercased.
* Merge branch 'master' into admonitionTiago Serafim2013-02-097-1/+49
|\ | | | | | | | | | | Conflicts: docs/extensions/index.txt tests/extensions/test.cfg
| * nl2br and attr_list compatability.Waylan Limberg2013-02-063-0/+6
| | | | | | | | | | | | Fixes #177. When using both extensions, breaks (`<br>`) must have a linebreak (`\n`) after them before attr_list is run. This patch reorders the treeprocessors so that happens ('attr_list' runs after 'prettify' not before). Also had to alter headerid extension so it runs after 'prettify' or it would run before 'attr_list' if loaded before 'attr_list' by user.