Skip to content

Commit

Permalink
Merge pull request #94 from myint/sphinx-integration-rework
Browse files Browse the repository at this point in the history
sphinx integration rework
  • Loading branch information
Cielquan committed Apr 18, 2022
2 parents ff44a71 + e3784cc commit b053326
Show file tree
Hide file tree
Showing 18 changed files with 268 additions and 233 deletions.
13 changes: 12 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ constraint is >=4.0 because of Sphinx's open upper constraints on jinja2 and mar
which result in import errors if not pinned below version 3 and 2 respectively. This happend
in Sphinx version 4.0.

You can also add Sphinx by yourself but the installed Sphinx version must be at least 1.5.
You can also add Sphinx by yourself but the installed Sphinx version must be at least 2.0.

To check that Sphinx support is enabled

Expand Down Expand Up @@ -372,6 +372,17 @@ History
(next version)
--------------

- Fix inability to ignore ``code``, ``code-block`` and ``sourcecode`` directives (#79)
- Fix ``code-block`` options recognition (#62)

.. _beaking_changes_v6:

BREAKING CHANGES
~~~~~~~~~~~~~~~~

- Drop support for sphinx < 2.0
- Drop default values for directves and roles for sphinx (#65)


5.0.0 (2022-04-17)
------------------
Expand Down
2 changes: 1 addition & 1 deletion examples/bad/bad_bash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Test
====

.. code-block:: bash
.. code:: bash
{
2 changes: 0 additions & 2 deletions examples/bad/bad_code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Test
====

``code`` rather than ``code-block``.

.. code:: python
print(
2 changes: 1 addition & 1 deletion examples/bad/bad_cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Test
====

.. code-block:: cpp
.. code:: cpp
int main()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/bad/bad_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Test
====

.. code-block:: python
.. code:: python
print(
2 changes: 1 addition & 1 deletion examples/bad/bad_rst_in_rst.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Test
====

.. code-block:: rst
.. code:: rst
Testing
===
40 changes: 20 additions & 20 deletions examples/good/good.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
Test
====

.. code-block:: bash
.. code:: bash
if [ "$x" == 'y' ]
then
exit 1
fi
.. code-block:: c
.. code:: c
float foo(int n)
{
Expand All @@ -19,7 +19,7 @@ Test
return x[0];
}
.. code-block:: cpp
.. code:: cpp
#include <iostream>
Expand All @@ -29,20 +29,20 @@ Test
return x;
}
.. code-block:: python
.. code:: python
print(1)
Run more tests for checking performance.

.. code-block:: bash
.. code:: bash
if [ "$x" == 'y' ]
then
exit 1
fi
.. code-block:: c
.. code:: c
float foo(int n)
{
Expand All @@ -52,7 +52,7 @@ Run more tests for checking performance.
return x[0];
}
.. code-block:: cpp
.. code:: cpp
#include <iostream>
Expand All @@ -62,18 +62,18 @@ Run more tests for checking performance.
return x;
}
.. code-block:: python
.. code:: python
print(1)
.. code-block:: bash
.. code:: bash
if [ "$x" == 'y' ]
then
exit 1
fi
.. code-block:: c
.. code:: c
float foo(int n)
{
Expand All @@ -83,7 +83,7 @@ Run more tests for checking performance.
return x[0];
}
.. code-block:: cpp
.. code:: cpp
#include <iostream>
Expand All @@ -93,18 +93,18 @@ Run more tests for checking performance.
return x;
}
.. code-block:: python
.. code:: python
print(1)
.. code-block:: bash
.. code:: bash
if [ "$x" == 'y' ]
then
exit 1
fi
.. code-block:: c
.. code:: c
float foo(int n)
{
Expand All @@ -114,7 +114,7 @@ Run more tests for checking performance.
return x[0];
}
.. code-block:: cpp
.. code:: cpp
#include <iostream>
Expand All @@ -124,18 +124,18 @@ Run more tests for checking performance.
return x;
}
.. code-block:: python
.. code:: python
print(1)
.. code-block:: bash
.. code:: bash
if [ "$x" == 'y' ]
then
exit 1
fi
.. code-block:: c
.. code:: c
float foo(int n)
{
Expand All @@ -145,7 +145,7 @@ Run more tests for checking performance.
return x[0];
}
.. code-block:: cpp
.. code:: cpp
#include <iostream>
Expand All @@ -155,7 +155,7 @@ Run more tests for checking performance.
return x;
}
.. code-block:: python
.. code:: python
# ¬∆˚ß∂ƒß∂ƒ˚¬∆
print(1)
2 changes: 1 addition & 1 deletion examples/good/good_cpp_with_local_include.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Test
====

.. code-block:: cpp
.. code:: cpp
#include "foo.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/good/good_markdown.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Test
====

.. code-block:: markdown
.. code:: markdown
[Markdown-style Link](https://www.example.com/)
4 changes: 2 additions & 2 deletions examples/good/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Тест
====

.. code-block:: python
.. code:: python
print("Привет!")
.. code-block:: bash
.. code:: bash
$ echo 'Привет' >> pipe.txt
$ echo 'файловая труба!' >> pipe.txt
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/with_configuration/bad.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

:some-custom-thing:`testing`

.. code-block:: cpp
.. code:: cpp
int main()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/with_configuration/good.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

:some-custom-thing:`testing`

.. code-block:: cpp
.. code:: cpp
int main()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/without_configuration/good.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

:some-custom-thing:`testing`

.. code-block:: cpp
.. code:: cpp
int main()
{
Expand Down
Loading

0 comments on commit b053326

Please sign in to comment.