Takeshi KOMIYA
b563fa44f2
Fix #1620 : Use VerbatimBorderColor to add frame to code-block in LaTeX
2015-01-18 15:32:17 +09:00
Georg Brandl
b9fe829e02
highlighting: fix potential TypeError
2015-01-06 17:10:43 +01:00
EricFromCanada
a63e4945ea
Add highlight_options configuration value
...
This changeset adds the `highlight_options` configuration value, which
specifies a dict of key-value pairs to pass to the Pygments highlighter
specified with `highlight_language`. For example, specifying
`highlight_options = {'funcnamehighlighting' : False}` for the 'php'
lexer will disable function name highlighting.
Both the HTML and LaTeX writers have been updated to include the
options when calling `highlight_block()`, as long as the currently
selected language matches what was set with `highlight_language`, i.e.
not when modified by `highlight::` or `code-block::` directives.
2015-01-05 12:58:43 -05:00
Georg Brandl
a23903d8d5
Merge branch 'stable'
2015-01-03 21:41:14 +01:00
Georg Brandl
567d52f199
all: update copyright
2015-01-03 21:36:32 +01:00
tk0miya
f51b945d89
Add frame to code-block in LaTeX
2014-10-08 21:52:33 +09:00
Georg Brandl
db1cf80a69
Make pygments unconditional, it is required by setup.py anyway.
2014-09-21 16:37:37 +02:00
Takayuki Shimizukawa
1e58062692
remove 'six' name except importing line.
2014-04-30 21:30:46 +09:00
Takayuki Shimizukawa
00eff0b7f6
use six privided text_type() to replace with unicode() to support py2/py3 in one source. refs #1350 .
2014-04-29 23:44:12 +09:00
Takayuki Shimizukawa
68290a266c
introduce the six module and reduce sphinx.util.pycompat implementation. refs #1350 .
2014-04-29 11:46:47 +09:00
Georg Brandl
41580fc373
merge with stable
2014-03-25 10:27:36 +01:00
Georg Brandl
53abebda69
Closes #636 : Keep straight single quotes in literal blocks in the LaTeX build.
2014-03-25 10:26:20 +01:00
Georg Brandl
ac92719ac3
Update copyright year.
2014-03-01 08:18:23 +01:00
Georg Brandl
e030031321
Update copyright year.
2014-03-01 08:18:16 +01:00
Takayuki Shimizukawa
cc7509966c
merge heads
2014-01-15 05:25:56 +00:00
Georg Brandl
b29226a060
Closes #845 : In code blocks, when the selected lexer fails, display line numbers nevertheless if configured.
2014-01-11 10:00:49 +01:00
Takayuki Shimizukawa
f7cb510ebd
Drop python-3.1 and remove support codes
2013-12-15 16:04:23 +09:00
Takayuki Shimizukawa
a8fc938d1b
Drop python-2.5 and remove 2.4,2.5 support codes
2013-12-15 14:16:53 +09:00
Georg Brandl
151856819c
Copyright update.
2013-01-01 22:13:15 +01:00
Georg Brandl
f30ef68167
Only select 3.x versions.
2012-10-28 18:12:06 +01:00
Georg Brandl
2b2bb4122d
Merged in shimizukawa/sphinx-fix-testing-fork (pull request #62 )
2012-10-28 18:10:19 +01:00
Georg Brandl
14d738c455
Closes #905 : work around Pygments bug returning str instead of Unicode from Latex formatter for empty input.
2012-08-19 12:13:43 +02:00
Takayuki Shimizukawa
33167797a0
fix for Python3.1: Python 3.1 can't proceess '\r' at parser; parser.suite("print('hello')\r\n")
cause error.
2012-05-03 10:15:21 +09:00
Georg Brandl
4ff9c71c91
Closes #810 : fix deprecation warnings with Python 3. What is left over is from nose or docutils.
2012-01-29 12:23:17 +01:00
Georg Brandl
fa100632c3
Closes #695 : When the highlight language "python" is specified explicitly, do not try to parse the code to recognize non-Python snippets.
...
Thanks to Jonas Haag for the patch.
2012-01-29 10:21:01 +01:00
Georg Brandl
c2ceb79881
More version-compatibility hack removals.
2011-09-25 08:47:56 +02:00
Georg Brandl
d7305c82da
Remove compatibility code for Pygments < 1.2.
2011-09-25 08:39:09 +02:00
Georg Brandl
ad5d9f7c6b
Add changelog entry for emphasize-lines and some coding style fixes.
2011-09-22 09:29:36 +02:00
Mark Lodato
94aab04ecb
PygmentsBridge: pass keyword arguments to Pygments
...
In Pygments.highlight_block, pass all extra keyword arguments, including
linenos, directly to the Pygments formatter. This allows custom
directives to use other Pygments features.
2011-07-06 22:05:22 -04:00
Mark Lodato
cab5a5edc1
PygmentsBridge: construct new formatter each time
...
Previously, we pre-constructed two different formatters, one with line
numbers and one without. This made the code rather confusing and also
was not scalable for options that take arguments, such as 'hl_lines'.
Now, we construct a new HTMLFormatter or LatexFormatter on each call to
highlight_block().
2011-07-06 21:52:10 -04:00
Georg Brandl
ca6a5b53c9
changeset: 3201:2a38261315ba
...
tag: tip
parent: 3199:cd7b0a8d99c6
user: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
date: Sun Jan 09 20:55:13 2011 +0100
summary: Trim <BLANKLINE> just like doctest flags.
2011-01-09 21:37:02 +01:00
Georg Brandl
442229dd97
Add `pyramid
` theme.
2011-01-04 17:49:59 +01:00
Georg Brandl
17efae5622
merge with 1.0
2011-01-04 11:29:09 +01:00
Georg Brandl
0e1db6ad90
New year update.
2011-01-04 10:00:51 +01:00
Georg Brandl
db8189083d
merge with 1.0
2010-10-22 11:16:48 +02:00
Georg Brandl
357f8472c7
#534 : warning message instead of crash if invalid Pygments lexer name is used.
2010-10-22 10:02:10 +02:00
Georg Brandl
861941e5f1
merge with 1.0
2010-08-05 16:20:12 +02:00
Georg Brandl
5b09e2b41a
Fix unwanted styling of C domain references (because of a namespace clash with Pygments styles).
2010-08-05 15:47:10 +02:00
Daniel Neuhäuser
23ef216a15
encode source code for parsing only on python 2.x
2010-05-30 15:15:57 +02:00
Daniel Neuhäuser
918a509efc
Check if a string is not unicode as a workaround for 3.x
2010-05-30 02:28:57 +02:00
Georg Brandl
517b045f86
merge with 0.6
2010-04-06 09:21:22 +02:00
Georg Brandl
1996a9e5e9
Add warning facility on unknown Pygments lexer names.
2010-04-04 20:27:41 +02:00
Georg Brandl
2acec48b86
merge with 0.6
2010-01-06 15:51:30 +01:00
Georg Brandl
975e0175cc
Restore compatibility with Pygments >= 1.2.
2010-01-06 15:42:13 +01:00
Georg Brandl
47ccbccc62
merge with 0.6
2010-01-01 14:10:48 +01:00
Georg Brandl
f6a56192d1
Happy new year!
2010-01-01 14:09:13 +01:00
Georg Brandl
b0ee528298
#265 : restore Jython compatibility.
2009-11-08 17:00:56 +01:00
Georg Brandl
5590675955
merge with 0.6
2009-11-09 00:33:49 +01:00
Georg Brandl
0ed845462f
#169 : Added the `trim_doctest_flags
` config value, which is true by default.
2009-06-16 21:53:53 +02:00
Georg Brandl
137db91d77
When highlighting Python code, ignore extra indentation before
...
trying to parse it as Python.
2009-06-04 18:21:26 +02:00