summaryrefslogtreecommitdiff
path: root/markdown/extensions/codehilite.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.