aboutsummaryrefslogtreecommitdiffstats
path: root/markdown
Commit message (Collapse)AuthorAgeFilesLines
* Refactored extension importing.Waylan Limberg2014-08-271-15/+23
| | | | | | | | | | | | | We now use importlib which means we no longer support Python 2.6. Also, this refactor properly imports third party extensions which reside at the root of PYTHONPATH. Previously, either `markdown.extensions.` or `mdx_` would be appended to any extension name that did not contain a dot, which required third party extensions to either be in submodules or use the old `mdx_` naming convention. This commit is also in preperation for #336. It will now be much easier to deprecate (and later remove) support for the old ways of handling extension names.
* Removed some old codeWaylan Limberg2014-08-251-4/+1
| | | | | | These couple lines were from an old - no longer used - method of stashing inlines. There is no need for it today. The if statement would never evaluate True.
* Fixed a bug in markdown.util.parseBoolValueWaylan Limberg2014-08-251-3/+3
| | | | | A couple scenarios with "None" were previously not accounted for. Also updated tests which guives us 100% for markdown/util.py
* Include __main__.py in coverage.Waylan Limberg2014-08-221-3/+3
|
* Added `--extension_configs` option to the CLI.Waylan Limberg2014-08-221-13/+37
| | | | | | | | | | The `--extension_configs` option must point to a YAML or JSON file. The contents of the file must parse to a Python Dict which will be passed to the `extension_configs` keyword of the `markdown.Markdown` class. Also added tests for all of the CLI option parsing options and updated documentation.
* 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-2110-13/+13
| | | | 'https://pythonhosted.org/Markdown/'. The former redirects to the latter anyway. Might as well point to the actual destination.
* Upped version to 2.5-dev and started release notes.Waylan Limberg2014-08-201-1/+1
|
* 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-3119-102/+100
| | | | | | | | | | | | | | | | | 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.
* Mark a few more lines with 'no cover' - missed them the first time through. ↵Waylan Limberg2014-07-113-6/+6
| | | | The rest should have test cases added.
* Marked a bunch of lines as 'no cover'. Coverage at 91%Waylan Limberg2014-07-1112-31/+32
|
* 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-262-7/+14
|\ | | | | Make smarty extension work together with attr_list
| * Make smarty extension use its own InlineProcessorDmitry Shachnev2014-05-261-5/+11
| |
| * Make it easier to override list of inline patterns for InlineProcessorDmitry Shachnev2014-05-261-2/+3
| |
* | Support extensions as modules.Waylan Limberg2014-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes #300. When a python module (.../__init__.py) is imported by `__import__` and the `from_list` argument is a unicode string (as is returned by rpartition), then an error is raised in Python 2.7. Force conversion to default string type (byte in 2.7 and unicode in 3) to avoid the error. For a full explaination, see issue [300](https://github.com/waylan/Python-Markdown/issues/300).
* | Upped version to 2.4.12.4.1-finalWaylan Limberg2014-05-221-1/+1
| |
* | Fix issue308 and fix (unrelated) failure to break out of nest loop.ryneeverett2014-05-212-22/+16
|/
* 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
|
* added nav-tag as block level elementDavid2014-03-021-1/+1
|
* Upped version to 2.4 final.2.4-finalWaylan Limberg2014-02-161-1/+1
|
* 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
|
* No longer restrict INLUNE_PLACEHOLDER to 4 digits.Waylan Limberg2014-02-021-1/+1
| | | | | | This was limiting the parser to only 10,000 placeholders (0-9999) per document. removing this limitation allows longer documents ot be parsered correctly. Fixes #255.
* Merge branch 'master' of github.com:waylan/Python-MarkdownWaylan Limberg2014-01-121-0/+2
|\
| * 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
| | |
* | | Improved multiline comment parsing.Waylan Limberg2014-01-121-4/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | | | | | 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-091-1/+1
| | | | | | | | | | | | 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.
* | Address various depreciated APIs in PythonWaylan Limberg2014-01-083-12/+12
| | | | | | | | | | This mostly revolves around old APIs for ElementTree, but includes a few others as well. Fixes #254. Thanks for the report.
* | Merge pull request #274 from ajdavis/highlight-linesWaylan Limberg2014-01-072-11/+58
|\ \ | | | | | | Add feature for emphasizing some lines in a code block.
| * | 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.
* | | Fixed parsing of brackets within inline image titles.Darell Tan2014-01-051-1/+1
|/ /
* / Miscellaneous improvements and bug fixes.ryneeverett2013-11-192-15/+19
|/
* Issue #52ryneeverett2013-10-143-51/+177
|