aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions/codehilite.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Use newer ElementTree API to avoid future breakage.Waylan Limberg2015-01-311-4/+3
|
* Flake8 cleanup (mostly whitespace).Waylan Limberg2014-11-201-32/+45
| | | | | | 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.
* Use Pygments APIfacelessuser2014-10-041-10/+10
|
* Standardized all extension header comments to a uniform format.Waylan Limberg2014-08-211-8/+5
|
* '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-19/+4
| | | | | | | | | | | | | | | | | 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).
* Marked a bunch of lines as 'no cover'. Coverage at 91%Waylan Limberg2014-07-111-1/+1
|
* Fix some tests failuresDmitry Shachnev2014-02-121-1/+1
|
* 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-4/+7
|
* Add feature for emphasizing some lines in a code block.A. Jesse Jiryu Davis2014-01-031-5/+29
| | | | 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.
* Deprecated CodeHilite's force_linenos config setting.Waylan Limberg2013-08-131-1/+1
| | | | It was previously marked pendingdeprecation in v2.3. Now deprecated.
* 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.
* Now using universal code for Python 2 & 3.Waylan Limberg2013-02-271-6/+7
| | | | | | | | | | 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.
* Allow better linenum override in CodeHiliteWaylan Limberg2013-02-141-10/+23
| | | | | | | | | | | Fixes #148. The "force_linenos" config setting of the CodeHilite extension has been marked as Pending Deprecation and a new setting "linenums" has been added to replace it. See documentation for the [CodeHilite Extension] for an explaination of the new "linenums" setting. The new setting will honor the old "force_linenos" if it is set, but it will raise a PendingDeprecationWarning and will likely be removed in a future version of Python-Markdown. [CodeHilite Extension]: extensions/codehilite.html
* Typo: Boolen -> Boolean.Grahack2012-08-291-2/+2
|
* Fixed #106. Replaced all references to freewisdom.org (except for Yuri's ↵Waylan Limberg2012-06-281-3/+3
| | | | homepage).
* Fixed Issue #98. The language designator must start at the beginging of the ↵Waylan Limberg2012-05-181-1/+1
| | | | first line of a code block for codehilite to recognize it.
* Fixed #73. Codehilite now works in footnotes.Waylan Limberg2012-01-201-1/+1
| | | | | | | | The footnotes treeprocessor must be the first one run so that all others, including codehilite's, can run on the contents of the footnote div which is created and inserted by the footnotes treeprocessor. Thanks to startling for the report.
* allow language guessing to be disabled by passing a setting to CodeHilite - ↵Rob McBroom2011-06-191-4/+16
| | | | closes #24
* Fixed typo in previous commit. Extension.getConfigs is a method, not a property.Waylan Limberg2011-05-041-1/+1
|
* Extension.getConfigs returns a dict and is used by the extensions that use ↵Waylan Limberg2011-05-041-5/+5
| | | | configs. No more self.config['name'][0] weirdness anymore.
* Factored out the importing of pygments in CodeHilite Extension so it doesn;t ↵Waylan Limberg2011-04-071-27/+24
| | | | happen every time a block is highlighted. Not sure why I didn't do it this way to begin with.
* Cleaned up CodeHilite extension. When pygments is not available provide ↵Waylan Limberg2011-04-071-25/+12
| | | | simpler markup which should allow for the use of JavaScript Highlighting libraries. In other words, no pygments like <div> and no <ol> for line numbering. Just a <pre><code> block with classes assinged to them. If people want fancier stuff, they can use JavaScript or create their own extension.
* Fixed tab_length on codehilite extension to match new implementation of ↵Waylan Limberg2010-07-071-11/+5
| | | | default configs.
* Changed the default style used by pygments in the codehilite extension. ↵Waylan Limberg2010-03-251-1/+1
| | | | This was a recently added feature, but older versions of pygments don't know what the 'tango' style is, so we now use pygemnts 'default' by default. Not sure why the 'tango' style was used here in the first place. I'm guess it was the preferance of whoever contributed the patch.
* Refactored codehilite and fenced code, so now fenced code will also be ↵Lucas van Dijk2010-01-251-39/+51
| | | | highlited when codehilite extension is enabled
* Updated codehilite extension for new refactor.Waylan Limberg2008-11-201-1/+1
|
* Moved markdown_extensions/ to markdown/extensions. Markdown is now one ↵Waylan Limberg2008-11-201-0/+224
package instead of two.