| 1 |
:tocdepth: 2 |
| 2 |
|
| 3 |
i18n with literal block |
| 4 |
========================= |
| 5 |
|
| 6 |
Correct literal block:: |
| 7 |
|
| 8 |
this is |
| 9 |
literal block |
| 10 |
|
| 11 |
Missing literal block:: |
| 12 |
|
| 13 |
That's all. |
| 14 |
|
| 15 |
.. literalinclude:: raw.txt |
| 16 |
:caption: included raw.txt |
| 17 |
|
| 18 |
code blocks |
| 19 |
============== |
| 20 |
|
| 21 |
.. highlight:: ruby |
| 22 |
|
| 23 |
:: |
| 24 |
|
| 25 |
def main |
| 26 |
'result' |
| 27 |
end |
| 28 |
|
| 29 |
:: |
| 30 |
|
| 31 |
#include <stdlib.h> |
| 32 |
int main(int argc, char** argv) |
| 33 |
{ |
| 34 |
return 0; |
| 35 |
} |
| 36 |
|
| 37 |
.. code-block:: c |
| 38 |
:caption: example of C language |
| 39 |
|
| 40 |
#include <stdio.h> |
| 41 |
int main(int argc, char** argv) |
| 42 |
{ |
| 43 |
return 0; |
| 44 |
} |
| 45 |
|
| 46 |
|
| 47 |
* :: |
| 48 |
|
| 49 |
literal-block |
| 50 |
in list |
| 51 |
|
| 52 |
.. highlight:: none |
| 53 |
|
| 54 |
:: |
| 55 |
|
| 56 |
test_code_for_noqa() |
| 57 |
continued() |
| 58 |
|
| 59 |
|
| 60 |
doctest blocks |
| 61 |
============== |
| 62 |
|
| 63 |
.. highlight:: python |
| 64 |
|
| 65 |
>>> import sys # sys importing |
| 66 |
>>> def main(): # define main function |
| 67 |
... sys.stdout.write('hello') # call write method of stdout object |
| 68 |
>>> |
| 69 |
>>> if __name__ == '__main__': # if run this py file as python script |
| 70 |
... main() # call main |
| 71 |
|