aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions
Commit message (Collapse)AuthorAgeFilesLines
* Add YAML support to Meta extensionKernc2014-11-301-7/+41
| | | | | | | | By default, this only supports YAML deliminators (`---`) and adds no additional behavior. In other words, parsing is unchanged. However, with the `yaml` option set, PyYAML will parse the metadata. Thanks to @kernc for suggesting the idea and doing the work on this.
* Completed flake8 cleanup.Waylan Limberg2014-11-201-1/+1
| | | | | I've decided to go with longer lines in the tests. Also fixed a couple errors with the previous cleanup.
* Flake8 cleanup (mostly whitespace).Waylan Limberg2014-11-2018-275/+346
| | | | | | Got all but a couple files in the tests (ran out of time today). Apparently I have been using some bad form for years (although a few things seemed to look better before the update). Anyway, conformant now.
* Issue #366 Recursion error in toc extfacelessuser2014-11-171-48/+47
| | | | | | | | This reworks the toc ordering to be done in a single pass with no recursion. Very long documents with lots of headers can actually exceed Python’s max recursion limit. By handling the toc ordering with no recursion, large documents can no longer cause toc to fail with recursion erros.
* Use Pygments APIfacelessuser2014-10-041-10/+10
|
* Run Meta after whitespace normalizationWaylan Limberg2014-09-261-1/+1
| | | | Fixes #343. Thanks for the report @AlexJF.
* Fixed TOC Option parsing.Waylan Limberg2014-09-251-2/+2
| | | | | | The new option parser assumes bool values if the default is bool or None. As the "title" option is not a bool value, it should default to an empty string rather than None. Fixes #347.
* Mark special treatment of extension names as PendingDeprecationWaylan Limberg2014-08-291-1/+14
| | | | | | | | | | | | | | | | | The builtin extensions will no longer get special treatment and have the path ("markdown.extensions.") appended . The same applies for "mdx_" extensions. All names extension must provide the full path. Fixes #336. Also deprecating support for passing in extension config settings as part of the string name. The extension_configs keyword should be used instead. Fixes #335. Also raising PendingDeprecationWarnings for positional args or the "config" keyword on the Extension Class. Pass each setting as a seperate keyword instead. Docs and tests are updated. Still need to update extension API docs.
* More updates to test configs.Waylan Limberg2014-08-292-11/+16
| | | | | | | | | | | | | | 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.
* Cleaned up some whitespace inconsistancies.Waylan Limberg2014-08-221-1/+1
|
* Standardized all extension header comments to a uniform format.Waylan Limberg2014-08-2117-446/+193
|
* 'http://packages.python.org/Markdown/' => ↵Waylan Limberg2014-08-218-11/+11
| | | | 'https://pythonhosted.org/Markdown/'. The former redirects to the latter anyway. Might as well point to the actual destination.
* Renamed 'smart_substitutions' option to 'substitutions'. Fixed a typo.Martin Altmayer2014-08-151-3/+2
|
* Fixed an old typo in the smarty extension and added a test case.Martin Altmayer2014-08-111-2/+2
|
* Replaced smart_lsquo etc. by a single option smart_substitutions which ↵Martin Altmayer2014-08-111-14/+32
| | | | allows to overwrite all substitution strings. Fixed line length in docs.
* Added options to the Smarty extension that configure the text that is used ↵Martin Altmayer2014-08-091-3/+10
| | | | to replace quotes. This makes it possible to use the correct quotes in languages other than English.
* Update extensions for Extension.__init__ refactorWaylan Limberg2014-07-3118-99/+92
| | | | | | | | | | | | | | | | | Fixes #325. All extensions can now accept a dict of configs or **kwargs, not just a list of tuples. Third party extensions may want to follow suite. Extensions may only accept keyword arguments in the future. These changes still need to be documented. A couple things of note: The CodeHilite extension previously issued a DeprecationWarning if the old config key `force_linenos` was used. With thins change, a KeyError will now be raised. The `markdown.util.parseBoolValue` function gained a new argument: `preserve_none` (defaults to False), which when set to True, will pass None through unaltered (will not convert it to False).
* Refactor markdown.extensions.Extension.__init__()Waylan Limberg2014-07-291-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in #325, setting up Extension configs is kind of a mess. Some places pass a list of tuples on initialization, others a dict. And sometimes they're passed as an arg, othertimes a kwarg. Addiitonaly, the docs are just as inconsistant. This refactor addresses all those sinerios with tests included. The existing extensions still need refactored. But the fact that their tests still pass means we havn't broken third party extensions either. This refactor also introduces a new API, which is the prefered method going forward. All docs should be updated to match. Whereas previously one might do: ```python MyExtension(configs={'key': 'foo', 'otherkey': 'bar'}) ``` This can now be done: ```python MyExtension(key='foo', otherkey='bar') ``` Of course, the old way still works for backward compatability. But that means the `configs` keyword has special status and cannot be used for another purpose.
* Marked a bunch of lines as 'no cover'. Coverage at 91%Waylan Limberg2014-07-113-3/+3
|
* smarty: add support for angled quotesDmitry Shachnev2014-06-191-0/+11
| | | | See <http://en.wikipedia.org/wiki/Guillemet>.
* Merge pull request #317 from mitya57/doctestsWaylan Limberg2014-06-167-37/+37
|\ | | | | Python 3.4 and fixes for doctests
| * Make doctests support Python 3Dmitry Shachnev2014-06-117-33/+33
| |
| * Fix a doctest in fenced_code.py.Andrey Rahmatullin2014-05-311-4/+4
| |
* | Fix #315: Change order of smarty patterns to make the test pass againDmitry Shachnev2014-06-081-2/+2
|/
* Merge pull request #311 from mitya57/masterWaylan Limberg2014-05-261-5/+11
|\ | | | | Make smarty extension work together with attr_list
| * Make smarty extension use its own InlineProcessorDmitry Shachnev2014-05-261-5/+11
| |
* | Fix issue308 and fix (unrelated) failure to break out of nest loop.ryneeverett2014-05-211-19/+13
|/
* smarty: Fix test failure with Python 3.1 and 3.2. Fixes #295Dmitry Shachnev2014-03-111-1/+1
|
* smarty: Pass tuples, not iterable strings to the pattern.Dmitry Shachnev2014-03-111-3/+3
|
* docs: improved documentation of the extra/ extensionsJakub Klinkovský2014-02-151-1/+1
| | | | | | Simplified, unified style, added some undocumented options. NOTE: Footnotes/UNIQUE_IDS stays mostly undocumented
* smarty: Get rid of canonicalize() function.Dmitry Shachnev2014-02-131-51/+16
| | | | | | | | The previous problem happened because canonicalize() removed the space from closeClass regexp. Instead of fixing the function, get rid of it completely. It should also make module load a bit faster.
* Fix some tests failuresDmitry Shachnev2014-02-121-1/+1
|
* Merge pull request #267 from ryneeverett/attr_list-tablesWaylan Limberg2014-01-111-0/+2
|\ | | | | tables and attr_list compatibility
| * tables and attr_list compatibilityryneeverett2013-11-131-0/+2
| |
* | Allow single as well as double quotes for hl_lines.A. Jesse Jiryu Davis2014-01-072-2/+4
| |
* | Support syntax for highlighted lines like: ```python hl_lines=“1 3”A. Jesse Jiryu Davis2014-01-062-6/+12
| |
* | Add feature for emphasizing some lines in a code block.A. Jesse Jiryu Davis2014-01-032-11/+50
| | | | | | | | A code blocked headed by “:::python{1,3}” now emphasizes the first and third lines. With fences enabled, ```python{1,3} has the same effect.
* | Miscellaneous improvements and bug fixes.ryneeverett2013-11-191-7/+5
|/
* Issue #52ryneeverett2013-10-141-8/+85
|
* toc: insert `&para;` instead of raw unicode characterDmitry Shachnev2013-09-291-3/+3
|
* Add new "permalink" option to toc extensionDmitry Shachnev2013-09-251-13/+31
| | | | and use it in our docs
* Add new utility function parseBoolValue()Dmitry Shachnev2013-09-253-23/+7
| | | | and use it in all extension that need parsing bool config values.
* Ensure each term on def list maintains its own loose status.Waylan Limberg2013-09-021-1/+1
| | | | | | 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.
* Allow fenced_code to be configurable in subclasses.Waylan Limberg2013-08-191-10/+9
| | | | | Not sure why I was using global variables here. Anyway. Fixed now. Thanks to Andrew for pointing it out.
* Deprecated CodeHilite's force_linenos config setting.Waylan Limberg2013-08-131-1/+1
| | | | It was previously marked pendingdeprecation in v2.3. Now deprecated.
* Extended headerid's rawHTML in id handling to toc ext.Waylan Limberg2013-08-112-16/+20
|
* Allow extensions to register serializersWaylan Limberg2013-08-071-7/+9
| | | | | | | | | Setting output_format must happen after extensions are loaded. Only in that way can an extension register a serializer so that it will then be available to be used with the output_format keyword. A test has been added to avoid this regression from happening again in the future. Fixes #238, partially reverses commit 41cc055 and provides a better fix for
* HeaderID Ext now handles raw html in ids. Fixes #232Waylan Limberg2013-07-281-1/+16
|
* Fix Python 3 compat in Attr_list. Fixes #218.Waylan Limberg2013-07-281-1/+1
|
* Some fixes requested by @waylan, cleanup and tests improvementsDmitry Shachnev2013-07-271-11/+9
|