Skip to content

Commit

Permalink
Add option 'class' to 'rv_code' directive.
Browse files Browse the repository at this point in the history
With we can set the language explicit. E.g. set python where highlight.js
fails::

   .. rv_code::
      :class: python

      >>> from fspath import FSPath
      >>> tmp = FSPath('~/tmp')
      >>> tmp
      '/home/user/tmp'
      >>> tmp.EXISTS
      False

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Jul 21, 2017
1 parent e78e45e commit 7cc38c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sphinxjp/themes/revealjs/directives.py
Expand Up @@ -172,7 +172,10 @@ class RvCodeDirective(Directive):
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = False
option_spec = {}
option_spec = {
'id': directives.unchanged,
'class': directives.class_option,
}
node_class = rv_code

def run(self):
Expand Down

0 comments on commit 7cc38c6

Please sign in to comment.