Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
f6d3fee8
Unverified
Commit
f6d3fee8
authored
Jan 18, 2022
by
Sylvain Gugger
Committed by
GitHub
Jan 18, 2022
Browse files
Error when code examples are improperly closed (#15186)
parent
22454ae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
utils/style_doc.py
utils/style_doc.py
+3
-0
No files found.
utils/style_doc.py
View file @
f6d3fee8
...
...
@@ -445,6 +445,9 @@ def style_mdx_file(mdx_file, max_len=119, check_only=False):
else
:
new_lines
.
append
(
line
)
if
in_code
:
raise
ValueError
(
f
"There was a problem when styling
{
mdx_file
}
. A code block is opened without being closed."
)
clean_content
=
"
\n
"
.
join
(
new_lines
)
diff
=
clean_content
!=
content
if
not
check_only
and
diff
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment