Unverified Commit 8d25df2c authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Make doc styler detect lists on rst (#9488)

parent 5a442a8d
...@@ -99,6 +99,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r ...@@ -99,6 +99,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ==================== ==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0 - transformers_version: 2.11.0
- framework: PyTorch - framework: PyTorch
- use_torchscript: False - use_torchscript: False
...@@ -145,6 +146,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r ...@@ -145,6 +146,7 @@ An instantiated benchmark object can then simply be run by calling ``benchmark.r
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ==================== ==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0 - transformers_version: 2.11.0
- framework: Tensorflow - framework: Tensorflow
- use_xla: False - use_xla: False
...@@ -228,6 +230,7 @@ configurations must be inserted with the benchmark args as follows. ...@@ -228,6 +230,7 @@ configurations must be inserted with the benchmark args as follows.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ==================== ==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0 - transformers_version: 2.11.0
- framework: PyTorch - framework: PyTorch
- use_torchscript: False - use_torchscript: False
...@@ -297,6 +300,7 @@ configurations must be inserted with the benchmark args as follows. ...@@ -297,6 +300,7 @@ configurations must be inserted with the benchmark args as follows.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
==================== ENVIRONMENT INFORMATION ==================== ==================== ENVIRONMENT INFORMATION ====================
- transformers_version: 2.11.0 - transformers_version: 2.11.0
- framework: Tensorflow - framework: Tensorflow
- use_xla: False - use_xla: False
......
...@@ -381,9 +381,9 @@ def style_rst_file(doc_file, max_len=119, check_only=False): ...@@ -381,9 +381,9 @@ def style_rst_file(doc_file, max_len=119, check_only=False):
doc = f.read() doc = f.read()
# Add missing new lines before lists # Add missing new lines before lists
doc = _add_new_lines_before_list(doc) clean_doc = _add_new_lines_before_list(doc)
# Style # Style
clean_doc = rst_styler.style(doc, max_len=max_len) clean_doc = rst_styler.style(clean_doc, max_len=max_len)
diff = clean_doc != doc diff = clean_doc != doc
if not check_only and diff: if not check_only and diff:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment