summaryrefslogtreecommitdiff
path: root/markdown/extensions/fenced_code.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Update fenced code extension to match codehilite lang regex. (#529)Waylan Limberg2017-01-181-1/+1
| | | Related to #527.
* Support CodeHilite option use_pygments in fenced_codeMartin Morgenstern2016-04-111-0/+1
|
* Flake8 cleanup (mostly whitespace).Waylan Limberg2014-11-201-15/+19
| | | | | | 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.
* Standardized all extension header comments to a uniform format.Waylan Limberg2014-08-211-80/+8
|
* 'http://packages.python.org/Markdown/' => ↵Waylan Limberg2014-08-211-2/+2
| | | | 'https://pythonhosted.org/Markdown/'. The former redirects to the latter anyway. Might as well point to the actual destination.
* Update extensions for Extension.__init__ refactorWaylan Limberg2014-07-311-2/+3
| | | | | | | | | | | | | | | | | 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).
* Make doctests support Python 3Dmitry Shachnev2014-06-111-6/+6
|
* Fix a doctest in fenced_code.py.Andrey Rahmatullin2014-05-311-4/+4
|
* 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
* Allow single as well as double quotes for hl_lines.A. Jesse Jiryu Davis2014-01-071-1/+2
|
* Support syntax for highlighted lines like: ```python hl_lines=“1 3”A. Jesse Jiryu Davis2014-01-061-2/+5
|
* Add feature for emphasizing some lines in a code block.A. Jesse Jiryu Davis2014-01-031-6/+21
| | | | 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.
* 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.
* 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.
* Update fenced_code.pyTimon Wong2013-03-151-1/+1
| | | CodeHilite: linenos is replaced by linenums
* Now using universal code for Python 2 & 3.Waylan Limberg2013-02-271-12/+8
| | | | | | | | | | 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.
* Moved whitespace normalization to a preprocessor.Waylan Limberg2013-02-081-1/+1
| | | | | | | | | | | | | | 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.
* Remove exec bit from extensions/fenced_code.pyDmitry Shachnev2012-11-031-0/+0
|
* Added support for <foo>+<bar> lexers of Pygmentspapaeye2012-07-211-1/+1
|
* Fixed #106. Replaced all references to freewisdom.org (except for Yuri's ↵Waylan Limberg2012-06-281-2/+2
| | | | homepage).
* Support github-flavored markdown by making the '.' optional before language ↵Mike Dirolf2012-01-171-1/+1
| | | | type.
* Fenced code blocks need to end with a fence on its own line.Mike Dirolf2012-01-171-1/+1
|
* Fixed #60. When we updated codehilite, we forgot to update fenced_codee to ↵Waylan Limberg2012-01-151-5/+5
| | | | work with it.
* appropriately move the tests to the fenced code documentation in the ↵Daniel Gottlieb2011-12-271-1/+11
| | | | extension source
* Allow tildes or backticks in the fenced_code extension to support the syntax ↵Daniel Gottlieb2011-12-271-1/+3
| | | | used by github
* Added doctests to fabfile and edited them to pass in all supported versions ↵Waylan Limberg2011-08-021-15/+17
| | | | of python. Note: one test (meta) is still failing on Python 3 due to unicode strings.
* allow language guessing to be disabled by passing a setting to CodeHilite - ↵Rob McBroom2011-06-191-0/+1
| | | | closes #24
* Extension.getConfigs returns a dict and is used by the extensions that use ↵Waylan Limberg2011-05-041-10/+4
| | | | configs. No more self.config['name'][0] weirdness anymore.
* Break cyclic import of markdown. This allows people to embed markdownToshio Kuratomi2010-07-051-1/+2
| | | | if they desire.
* Fixed some code that wasn't Python 2.4 compatible.Waylan Limberg2010-02-221-1/+1
|
* Refactored codehilite and fenced code, so now fenced code will also be ↵Lucas van Dijk2010-01-251-42/+29
| | | | highlited when codehilite extension is enabled
* Added pygments support to fenced_codeLucas van Dijk2010-01-241-13/+64
|
* Updated fenced_code extension to fit in with consensious on Markdown list. ↵Waylan Limberg2009-02-021-5/+5
| | | | Language is defined on first line rather than last, and currly brackets around language are optional.
* Updated fenced_code extension for package refactor.Waylan Limberg2008-11-221-1/+1
|
* Moved markdown_extensions/ to markdown/extensions. Markdown is now one ↵Waylan Limberg2008-11-201-0/+117
package instead of two.