mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add changelog entry for emphasize-lines and some coding style fixes.
This commit is contained in:
parent
5373125fc6
commit
ad5d9f7c6b
7
CHANGES
7
CHANGES
@ -27,10 +27,10 @@ Features added
|
|||||||
|
|
||||||
* Markup:
|
* Markup:
|
||||||
|
|
||||||
- #138: Add an :rst:role:`index` role, to make inline index entries.
|
- #138: Added an :rst:role:`index` role, to make inline index entries.
|
||||||
- #454: Add more index markup capabilities: marking see/seealso entries,
|
- #454: Added more index markup capabilities: marking see/seealso entries,
|
||||||
and main entries for a given key.
|
and main entries for a given key.
|
||||||
- #460: Allow limiting the depth of section numbers for HTML using the
|
- #460: Allowed limiting the depth of section numbers for HTML using the
|
||||||
:rst:dir:`toctree`\'s ``numbered`` option.
|
:rst:dir:`toctree`\'s ``numbered`` option.
|
||||||
- #586: Implemented improved :rst:dir:`glossary` markup which allows
|
- #586: Implemented improved :rst:dir:`glossary` markup which allows
|
||||||
multiple terms per definition.
|
multiple terms per definition.
|
||||||
@ -38,6 +38,7 @@ Features added
|
|||||||
- C++ domain now supports array definitions.
|
- C++ domain now supports array definitions.
|
||||||
- Section headings in :rst:dir:`only` directives are now correctly
|
- Section headings in :rst:dir:`only` directives are now correctly
|
||||||
handled.
|
handled.
|
||||||
|
- Added ``emphasize-lines`` option to source code directives.
|
||||||
|
|
||||||
* HTML builder:
|
* HTML builder:
|
||||||
|
|
||||||
|
@ -98,6 +98,9 @@ emphasize particular lines::
|
|||||||
print 'This one is not...'
|
print 'This one is not...'
|
||||||
print '...but this one is.'
|
print '...but this one is.'
|
||||||
|
|
||||||
|
.. versionchanged:: 1.1
|
||||||
|
``emphasize-lines`` has been added.
|
||||||
|
|
||||||
|
|
||||||
Includes
|
Includes
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
@ -101,6 +101,10 @@ class PygmentsBridge(object):
|
|||||||
self.formatter = self.latex_formatter
|
self.formatter = self.latex_formatter
|
||||||
self.formatter_args['commandprefix'] = 'PYG'
|
self.formatter_args['commandprefix'] = 'PYG'
|
||||||
|
|
||||||
|
def get_formatter(self, **kwargs):
|
||||||
|
kwargs.update(self.formatter_args)
|
||||||
|
return self.formatter(**kwargs)
|
||||||
|
|
||||||
def unhighlighted(self, source):
|
def unhighlighted(self, source):
|
||||||
if self.dest == 'html':
|
if self.dest == 'html':
|
||||||
return '<pre>' + cgi.escape(source) + '</pre>\n'
|
return '<pre>' + cgi.escape(source) + '</pre>\n'
|
||||||
@ -212,11 +216,6 @@ class PygmentsBridge(object):
|
|||||||
# so let it pass unhighlighted
|
# so let it pass unhighlighted
|
||||||
return self.unhighlighted(source)
|
return self.unhighlighted(source)
|
||||||
|
|
||||||
def get_formatter(self, **kwargs_orig):
|
|
||||||
kwargs = self.formatter_args.copy()
|
|
||||||
kwargs.update(kwargs_orig)
|
|
||||||
return self.formatter(**kwargs)
|
|
||||||
|
|
||||||
def get_stylesheet(self):
|
def get_stylesheet(self):
|
||||||
if not pygments:
|
if not pygments:
|
||||||
if self.dest == 'latex':
|
if self.dest == 'latex':
|
||||||
|
Loading…
Reference in New Issue
Block a user