Compare commits

..

1 Commits

Author SHA1 Message Date
Sergio Martínez Portela
5432c23202 Explicitly extract code block language.
Some checks failed
Testing / pytest (push) Successful in 26s
Testing / mypy (push) Successful in 35s
Testing / style-formatting (push) Failing after 30s
Testing / style-sorted-imports (push) Successful in 35s
Testing / stability-extra-test (push) Successful in 28s
2024-09-30 23:55:07 +02:00

View File

@ -922,6 +922,9 @@ class Headline:
if " " in arguments:
language = arguments[: arguments.index(" ")]
arguments = arguments[arguments.index(" ") + 1 :]
else:
language = arguments
arguments = None
sections.append(
{
"line_first": start + 1,
@ -984,6 +987,7 @@ class Headline:
content = section["content"]
code_result = section.get("result", None)
arguments = section.get("arguments", None)
language = section.get("language", None)
name = section.get("name", None)
results.append(
CodeSnippet(