aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Add an explanatory comment.HEADmasterWaylan Limberg2018-09-221-0/+2
|
* Bring back the old version variableFilipp Lepalaan2018-09-221-0/+1
|
* Bump version to 3.03.0Waylan Limberg2018-09-211-1/+1
|
* Consistent copyright headers.Waylan Limberg2018-07-271-21/+11
| | | | Fixes #435.
* Improve test coverage.Waylan Limberg2018-01-131-1/+1
|
* Correct spelling mistakes.Edward Betts2018-01-131-1/+1
|
* Moved core to core.pyWaylan Limberg2018-01-111-485/+24
| | | | | | __version__ is now in __init__.py (as is should be) and the core is defined in core.py. Other than version, __init__.py is just a dummy which imports the pieces we make public.
* Switch docs to MKDocs (#602)Waylan Limberg2017-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #601. Merged in 6f87b32 from the md3 branch and did a lot of cleanup. Changes include: * Removed old docs build tool, templates, etc. * Added MkDocs config file, etc. * filename.txt => filename.md * pythonhost.org/Markdown => Python-Markdown.github.io * Markdown lint and other cleanup. * Automate pages deployment in makefile with `mkdocs gh-deploy` Assumes a git remote is set up named "pages". Do git remote add pages https://github.com/Python-Markdown/Python-Markdown.github.io.git ... before running `make deploy` the first time.
* Tables: Improvements (#530)Isaac Muse2017-01-191-3/+3
| | | | | | | Tables now handle escaped pipes when testing, in table borders, and in the inline content. To achieve properly, a bug had to be fixed related to appending escaped chars to the Markdown class. Now appended chars only appear in the current instance. Lastly the first backtick in a table can be escaped rounding out the last corner case.
* Convert readthedocs link for their .org -> .io migration for hosted projectsAdam Chainz2016-05-291-1/+1
| | | | | | | | As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’: > Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard. Test Plan: Manually visited all the links I’ve modified.
* Miscellaneous capitalization/spelling fixesKevin Yap2015-04-061-6/+6
|
* Fix formatting DeprecationWarning messages.Dmitry Shachnev2015-02-201-2/+2
| | | | | Without the space, Python joins the lines and it produces results like 'Positional arguments are depreacted in MarkdownUse keyword arguments only'.
* No binary operators at begining of line.Waylan Limberg2015-02-181-2/+2
| | | | | | | Apparently this is a new requirement of flake8. That's the thing about using tox. Every test run reinstalls all dependencies so an updated dependency might instroduce new errors. I could specify a specific version, but I like staying current.
* Fix back-compat import of ext names without dots.Waylan Limberg2015-02-021-1/+1
| | | | | | `makeExtension` is the module level function defined in an extension, not `extendMarkdown`, which is the method you override on the Extension class. Do'h. Thanks for catching this @mitya57.
* Only log warnings from commandline script.Waylan Limberg2015-01-311-1/+1
| | | | | | | | | I need to remember this is a lib first and not configure logging from within the lib. Also, from the script we are now actually displaying deprecation warnings. For some reason I don't understnad deprecation warnings are hidden by default in Python. And who remembers to run Python with the `-Wd` flag every time they upgrade a lib just to make sure there's no new deprecations? Fixes #384.
* PendingDeprecationWarning (v2.5) => DeprecationWarning (v2.6)Waylan Limberg2014-12-301-31/+25
|
* 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-201-76/+111
| | | | | | 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.
* Changed logging level when loading extensionsChris Topaloudis2014-10-241-1/+1
| | | So it suppresses messages for loaded extensions when its used as third party.
* Added a temp workwround for deprecated short ext names.Waylan Limberg2014-09-251-0/+4
| | | | | | | | | | | | As we chnaged the order in import trys for short names extensions (no dot syntax), an extra test was added to the import code for the occassion when a naming conflict exists. For example, if PyTables is installed (module name is tables) and the user tries to use the short name 'tables' instead of 'markdown.extensions.tables'. Fixes #341. Of course, this code will get ripped out when the old behavior is fully deprecated.
* Deprecate positional args for markdownFromFile also.Waylan Limberg2014-09-121-0/+4
|
* Mark "Safe Mode" as pending deprecation.Waylan Limberg2014-09-011-6/+21
| | | | | Both `safe_mode` and `html_replacement_test` keywords are pending deprecation, as are positional args. Closes #337.
* Mark special treatment of extension names as PendingDeprecationWaylan Limberg2014-08-291-6/+27
| | | | | | | | | | | | | | | | | 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-291-2/+2
| | | | | | | | | | | | | | 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.
* Allow named extensions to specify the Class NameWaylan Limberg2014-08-271-10/+16
| | | | | | | | | | | | | | | | | | If you were to import the class like this: from path.to.module import SomeExtensionClass Then the named extension would be the string: "path.to.module:SomeExtensionClass" This should simplify loading extensions from the command line or template filters -- expecially when multiple extensions are defined in a single python module. The docs still need updating. I'm waiting to update the docs after implementing #335 and #336 as that will require a major refactor of that section of the docs anyway.
* 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.
* 'http://packages.python.org/Markdown/' => ↵Waylan Limberg2014-08-211-1/+1
| | | | 'https://pythonhosted.org/Markdown/'. The former redirects to the latter anyway. Might as well point to the actual destination.
* Marked a bunch of lines as 'no cover'. Coverage at 91%Waylan Limberg2014-07-111-2/+2
|
* 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).
* Address various depreciated APIs in PythonWaylan Limberg2014-01-081-1/+1
| | | | | This mostly revolves around old APIs for ElementTree, but includes a few others as well. Fixes #254. Thanks for the report.
* Update __init__.pyMark Eichin2013-09-261-1/+1
| | | spelling.
* fix typoFND2013-09-041-1/+1
|
* Allow extensions to register serializersWaylan Limberg2013-08-071-1/+1
| | | | | | | | | 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
* Remove some unused importsDmitry Shachnev2013-03-231-1/+0
|
* Future imports go after the docstringsAdam Dinwoodie2013-03-181-1/+1
| | | | | | | | | A `from __future__ import ...` statement must go after any docstrings; since putting them before the docstring means the docstring loses its magic and just becomes a string literal. That then causes a syntax error if there are further future statements after the false docstring. This fixes issue #203, using the patch provided by @Arfrever.
* Dict.keys() does not return a list in Python 3.Waylan Limberg2013-02-271-1/+1
|
* Now using universal code for Python 2 & 3.Waylan Limberg2013-02-271-24/+26
| | | | | | | | | | The most notable changes are the use of unicode_literals and absolute_imports. Actually, absolute_imports was the biggest deal as it gives us relative imports. For the first time extensions import markdown relative to themselves. This allows other packages to embed the markdown lib in a subdir of their project and still be able to use our extensions.
* Footnote ids contain dashes when outputing HTML5.Waylan Limberg2013-02-081-1/+1
| | | | | Previously they contained colons - and they still do for HTML4 and XHTML. Fixes #180.
* Updated docs to reflect extension loading best practices.Waylan Limberg2013-02-081-5/+0
| | | | Fixes #184. Also delted some commented out code I missed in previous commit.
* Moved whitespace normalization to a preprocessor.Waylan Limberg2013-02-081-4/+4
| | | | | | | | | | | | | | Fixes #150 - at least as much as I'm willing to. This allows whitespace normalization to be overridable by the extension API. Yes, I realize that most other processors will also proabably need to be overniriden to work with any differant whitespace normalization - but I'm okay with that. As pointed out in #150, some processors have the tab length hardcoded in regexes. I'm willing to accept a working patch that fixes that - and keeps the regexes easy to override in a subclass (the provded patch moved them inside the __init__ method - which is not so easy to override in a subclass)). However, that is about the only additional change I'm willing to consider for this issue.
* Cleaned up fixes for #183Waylan Limberg2013-02-081-0/+1
| | | | | | | | | My previous commit (d5a94c2) broke a few things badly. Unfortunately I failed to run the complete test suite and didn't catch it. A bad regex was crashing the test suite. Also cleaned up a few other odds and ends from previous work on #183. Still loosing a few random empty lines in code blocks though. I suspect this may also fix #188.
* Preserve whitespace in empty linesWaylan Limberg2013-02-071-1/+0
| | | | | | | | 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.
* Preserve empty lines in code blocksWaylan Limberg2013-02-061-1/+1
| | | | | | Partial fix for #183. Some lines are still being lost. When the processors are run, one line is lost. When their calling code is comments out (completely skiped) a line is still lost if more than 3 exist in a row. Also need to add some tests for this.
* Upped version to 2.3.dev.Waylan Limberg2012-12-051-3/+1
| | | | | Also refactored the version info to force PEP 386 compliance and to avoid the need to change the version in both the source and setup.py
* Merge pull request #159 from mitya57/masterWaylan Limberg2012-11-091-1/+0
|\ | | | | Fixed pyflakes warnings
| * Fix all pyflakes unused-import/unused-variable warningsDmitry Shachnev2012-11-091-1/+0
| |
* | Updated fix for #158 for Python <2.7Waylan Limberg2012-11-081-1/+1
| | | | | | | | | | | | | | Apparently, the `errors` keyword to encode was added in Python 2.7. In previous versions, it was just a positional argument. This should now work in all support versions. Thanks to @Gamma3000 for assistance in working through this issue.
* | Fixed #158. Now properly encoding output to stdout.Waylan Limberg2012-11-071-8/+7
|/ | | | | | | | This is another try at this problem. The trick is geting code that works with both Python 2 and Python 3. I think this does it. The only improvment I can see now is to catch any errors and customize the error message to sugg that the user set the environment variable PYTHONIOENCODING to the desired encoding before calling the commandline script.
* Upped version to 2.2.1.Waylan Limberg2012-11-041-2/+2
|
* Misc typos.chri2012-08-281-1/+1
|