summaryrefslogtreecommitdiff
path: root/markdown
Commit message (Collapse)AuthorAgeFilesLines
* Fixed many failing tests in inline refactor. Still a ways to go.inlineWaylan Limberg2015-06-216-52/+28
|
* Inital attempt at an inline refactor.Waylan Limberg2015-06-192-33/+142
| | | | | | | | | | | This is very much incomplete and not fully tested. Likely still a long way to go. At least it works with a some simple stuff. However, tails are currenlty processed twice and various now-uneeded pieces have not yet been removed. Added a new treeprocessor which runs inlinepatterns without the need to use placeholders or alter patterns. Note that any pattern that made use of groups will need to be updated (reduce each group by 1) as a result.
* flake8 cleanup.Waylan Limberg2015-04-221-1/+0
|
* Revert to ext short names now that we use entry_points.Waylan Limberg2015-04-221-6/+6
|
* smart_emphasis keyword > legacy_em extension.Waylan Limberg2015-04-225-58/+40
| | | | | | | | | The smart_strong extension has been removed and its behavior is now the default (smart em and smart strong are the default). The legacy_em extension restores legacy behavior. This completes the removal of keywords. All parser behavior is now modified by extensions, not by keywords on the Markdown class.
* Removed laxy_ol keyword. Use sane_lists extension instead.Waylan Limberg2015-04-223-4/+5
|
* Moved enable_attributes keyword to extension: legacy_attrs.Waylan Limberg2015-04-224-42/+47
| | | | | | If you have existing documents that use the legacy attributes format, then you should enable the legacy_attrs extension for those documents. Everyone is encouraged to use the attr_list extension going forward.
* Removed some Python2.6- specific code.Waylan Limberg2015-04-221-14/+1
|
* Simplify output_formats to html and xhtml.Waylan Limberg2015-04-221-18/+4
| | | | | | | | | We started with the numbers before HTML5 was a thing and we thought there might be an XHTML2. Today, we know that all we have are HTML style tags and XHTML style tags. Nothing else really matters in the real world. Note that if '(x)html1' '(x)html4' or '(x)html5' are passed in, the number is stripped/ignored. Users shouldn't need to change their code for this.
* Cleaned up some old Python 2.4 code.Waylan Limberg2015-04-221-7/+1
|
* All Markdown instances are now 'md'.Waylan Limberg2015-04-2214-82/+82
| | | | | | | Previously, instances of the Markdown class were represented as any one of 'md', 'md_instance', or 'markdown'. This inconsistancy made it diffcult when developing extensions, or just maintaining the existing code. Now, all instances are consistantly represented as 'md'.
* Removed deprecated HeaderId Extension.Waylan Limberg2015-04-221-93/+0
| | | | Use the TOC extension instead.
* Removed md_globals from extension API.Waylan Limberg2015-04-2219-21/+19
| | | | | There is no need for this anymore. In the past, most config was using globals. Today all config is held on the class instance.
* Replaced scripts with 'console_scripts' entry points.Waylan Limberg2015-04-221-1/+1
| | | | | | | | The 'bin/markdown_py' script has been replaced with a 'markdown' entry point and 'run_tests.py' with a 'mdtests' entry point. The makefile uses 'python -m markdown.test' rather than 'mdtests' so it can run even if the package is not installed.
* Removed now unnessecary 'makeExtension' functions from extensions.Waylan Limberg2015-04-2218-72/+2
| | | | And misc. cleanup from adopting entrypoints for extensions.
* Use entry points to load extensions by name.Waylan Limberg2015-04-221-39/+23
| | | | | | | | | | | | | | | | | | All previously supported methods of loading an extension given a string name have now been replaced with entry points. Extension classes must be registered as entry points in the 'markdown.extensions' group to support string names. The old module-level 'makeExtension' function is no longer needed. In fact, multiple extensions could be defined in one module and still use string names if entry points are defined pointing to each Extension subclass. All of the build-in extensions are now registered with names that mimic their paths (using dot notation). That may change in the future. It is expected that all extensions will use short names. We may support both ('extra' & 'markdown.extensions.extra') in the interim. Also, all extension configs must now be dicts. Support for a list of tuples has been removed.
* Moved testing framework into library.Waylan Limberg2015-04-221-0/+232
| | | | | | | | | | | | | | The testing framework can now be used by third party extensions to run local tests using Python-Markdown's testing framework. All syntax tests are assumed to be in `cwd/tests/` (where 'cwd' is the current working directory) and its subdirectories. As previosly, UnitTests use normal discovery methods. Note that the actual tests themselves are not in the lib, only the framework. To run tests, from the appropriate directory (the parent dir of `tests/`) run `python -m markdown.test`. Note that the HTMLOutput plugin has been removed as I haven't used in in years.
* 100% coverage of core.py and flake8 cleanup.Waylan Limberg2015-04-223-8/+4
|
* Removed unused import.Waylan Limberg2015-04-221-1/+0
|
* Removed deprecated support for positional args on Extension class.Waylan Limberg2015-04-2218-77/+49
|
* removed -safe option from commandline script.Waylan Limberg2015-04-222-9/+0
|
* Removed deprecated safe_mode.Waylan Limberg2015-04-2210-117/+24
|
* Removed deprecated support for short extension names.Waylan Limberg2015-04-221-51/+4
|
* Removed support for deprecated config in ext name.Waylan Limberg2015-04-221-19/+2
|
* Removed deprecated support for positional args.Waylan Limberg2015-04-221-32/+4
|
* Moved core to core.pyWaylan Limberg2015-04-224-515/+518
| | | | | | __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.
* Upped version to 3.0.0.devWaylan Limberg2015-04-221-1/+2
|
* Upped version to 2.6.22.6.2-finalWaylan Limberg2015-04-201-1/+1
|
* Merge pull request #404 from iKevinY/spelling-fixesWaylan Limberg2015-04-061-6/+6
|\ | | | | Miscellaneous capitalization/spelling fixes
| * Miscellaneous capitalization/spelling fixesKevin Yap2015-04-061-6/+6
| |
* | added support for zero row tablespieterprovoost2015-04-051-2/+2
|/
* smarty: Add back special case for decade abbreviationsDmitry Shachnev2015-03-181-0/+4
| | | | | | | | | | 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.
* Add Comment support to toc.Waylan Limberg2015-03-141-2/+2
| | | | | | A etree can contain Comments, PIs or other Elements which do not have a string for a tag. Must always check that a tag is a string before doing string processing on it. Otherwise, things will crash.
* Upped version to 2.6.12.6.1-finalWaylan Limberg2015-03-081-1/+1
|
* Removed `yaml` option from meta-data extension.Waylan Limberg2015-03-081-34/+6
| | | | | The option was buggy. Rather than try to fix it, it is being removed. This feeture should exist as a seperate extension. Fixes #390.
* No `=` in key or value of attr lists.Waylan Limberg2015-02-241-2/+2
| | | | Fixes #389. Thanks for the report @lazka.
* 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'.
* Upped version to 2.6 final2.6-finalWaylan Limberg2015-02-191-1/+1
|
* No binary operators at begining of line.Waylan Limberg2015-02-184-17/+14
| | | | | | | 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.
* Added a 'use_pygments' config option to CodeHilite.Waylan Limberg2015-02-051-7/+10
| | | | | | | | | Fixes #386. I'm doing this against my better judgement. The only reason is that I'm using the HTML format suggested by the HTML5 Spec and will simply not consider any alternate output. If a JavaScript library requires something else, to bad. I don't care. That library should support the format suggested by the spec or I'm not interested in it. If you want something else then you can create your own extension which does whatever you want.
* Upgraded to DeprecationWarning on ext `config` keyword.Waylan Limberg2015-02-051-9/+11
| | | | | | | | | Also checked for `None` so the existing extensions will at least still work. Of course, that code all gets deleted with the next release and things will break if extension authors do not update their code. Hope they test there code with each release and check for warnings. Also added a note to the release notes.
* 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.
* Use newer ElementTree API to avoid future breakage.Waylan Limberg2015-01-317-10/+9
|
* Only log warnings from commandline script.Waylan Limberg2015-01-313-18/+28
| | | | | | | | | 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.
* More refactor of TOC Extension.Waylan Limberg2015-01-011-24/+24
| | | | | | Mostly just code cleanup so it reads better. Renamed a few internal things. I didn't write this extension originally so most of this would have been done a long time ago. I just havn't touched this code much till now.
* HeaderId Extension marked as Pending Deprecation.Waylan Limberg2015-01-012-69/+74
| | | | | | | | | | | | | | | | | | | | Use the Table of Contents Extension instead. The HeaderId Extension will raise a PendingDeprecationWarning. The last few features of the HeaderID extension were mirgrated to TOC including the baselevel and separator config options. Also, the marker config option of TOC can be set to an empty string to disable searching for a marker. The `slugify`, `unique` and `stashedHTML2text` functions are now defined in the TOC extension in preperation for the HeaderId extension being removed. All coresponding tests are now run against the TOC Extension. The meta-data support of the HeaderId Extension was not migrated and no plan exists to make that migration. The `forceid` config option makes no sense in the TOC Extension and the only other config setting supported by meta-data was the `header_level`. However, as that depends on the template, it makes more sense to not be defined at the document level.
* PendingDeprecationWarning (v2.5) => DeprecationWarning (v2.6)Waylan Limberg2014-12-302-35/+29
|
* Preserve order of nested headers in TOCWaylan Limberg2014-12-301-49/+55
| | | | | | | | | 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.
* Complete test coverage of TOC ExtensionWaylan Limberg2014-12-301-8/+6
|
* Always add toc to Markdown Class InstanceWaylan Limberg2014-12-301-6/+6
| | | | | | | | Previously, we only added the toc attribute (md.toc) if no Marker was found within the document. However, that has caused framworks to do things like force insert a marker, run convert, then extract the toc from the body of the document. This is much cleaner. And if the user wants to add the toc to the document also, they still can.