mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
* for pull request #258: update CHANGES, add tests, add a document and refactoring.
This commit is contained in:
3
tests/roots/test-directive-code/conf.py
Normal file
3
tests/roots/test-directive-code/conf.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
master_doc = 'index'
|
||||
22
tests/roots/test-directive-code/dedent.rst
Normal file
22
tests/roots/test-directive-code/dedent.rst
Normal file
@@ -0,0 +1,22 @@
|
||||
Dedent
|
||||
======
|
||||
|
||||
Code blocks
|
||||
-----------
|
||||
|
||||
.. code-block:: ruby
|
||||
:linenos:
|
||||
:dedent: 4
|
||||
|
||||
def ruby?
|
||||
false
|
||||
end
|
||||
|
||||
|
||||
Literal Include
|
||||
---------------
|
||||
|
||||
.. literalinclude:: literal.inc
|
||||
:language: python
|
||||
:lines: 10-11
|
||||
:dedent: 4
|
||||
24
tests/roots/test-directive-code/index.rst
Normal file
24
tests/roots/test-directive-code/index.rst
Normal file
@@ -0,0 +1,24 @@
|
||||
test-directive-code
|
||||
===================
|
||||
|
||||
.. toctree::
|
||||
|
||||
*
|
||||
|
||||
|
||||
Code blocks
|
||||
-----------
|
||||
|
||||
.. code-block:: ruby
|
||||
:linenos:
|
||||
|
||||
def ruby?
|
||||
false
|
||||
end
|
||||
|
||||
|
||||
Literal Includes
|
||||
----------------
|
||||
|
||||
.. literalinclude:: literal.inc
|
||||
:language: python
|
||||
13
tests/roots/test-directive-code/literal.inc
Normal file
13
tests/roots/test-directive-code/literal.inc
Normal file
@@ -0,0 +1,13 @@
|
||||
# Literally included file using Python highlighting
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
foo = "Including Unicode characters: üöä"
|
||||
|
||||
class Foo:
|
||||
pass
|
||||
|
||||
class Bar:
|
||||
def baz():
|
||||
pass
|
||||
|
||||
def bar(): pass
|
||||
Reference in New Issue
Block a user