Skip to content

Commit

Permalink
Merge 151644b into 1a1cd05
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Feb 19, 2020
2 parents 1a1cd05 + 151644b commit b8b5a52
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["myst_parser", "sphinxcontrib.bibtex"]
extensions = ["myst_parser", "sphinxcontrib.bibtex", "sphinx_tabs.tabs"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
26 changes: 26 additions & 0 deletions docs/test/md.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Testing md


````{tabs}
```{tab} testa
contenta
```
```{tab} testb
contentb
```
````

````{tabs}
```{tab}
testa
contenta1
contenta2
```
```{tab}
testb
contentb1
contentb2
```
````
25 changes: 25 additions & 0 deletions docs/test/rst.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Testing rst
===========

.. tabs::

.. tab:: testa

contenta

.. tab:: testb

contentb

.. note::

normal

.. note:: start writing
and don't
stop


.. note:: start writing

with space
2 changes: 2 additions & 0 deletions docs/using/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ Myst documents.
```{toctree}
install.md
syntax.md
../test/md.md
../test/rst.rst
```
6 changes: 3 additions & 3 deletions myst_parser/docutils_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,15 @@ def parse_directive_arguments(directive, arg_text):
arguments = arg_text.split()
if len(arguments) < required:
raise DirectiveParsingError(
"{} argument(s) required, {} supplied".format(required, len(arguments))
"{} argument(s) required, {} supplied, argument text: '{}'".format(required, len(arguments), arg_text)
)
elif len(arguments) > required + optional:
if directive.final_argument_whitespace:
arguments = arg_text.split(None, required + optional - 1)
else:
raise DirectiveParsingError(
"maximum {} argument(s) allowed, {} supplied".format(
required + optional, len(arguments)
"maximum {} argument(s) allowed, {} supplied, argument text: '{}'".format(
required + optional, len(arguments), arg_text
)
)
return arguments
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
],
extras_require={
"sphinx": ["pyyaml", "docutils>=0.15", "sphinx>=2,<3"],
"sphinx": ["pyyaml", "docutils>=0.15", "sphinx>=2,<3", "sphinx-tabs"],
"code_style": ["flake8<3.8.0,>=3.7.0", "black", "pre-commit==1.17.0"],
"testing": [
"coverage",
Expand Down

0 comments on commit b8b5a52

Please sign in to comment.