Repository navigation
Libdoc: Preserve Markdown docs in spec files by default - #5841
Open
gaurav0107 wants to merge 1 commit into
Open
gaurav0107 wants to merge 1 commit into
gaurav0107 wants to merge 1 commit into
Conversation
Add new `AUTO` value for `--specdocformat` and use it by default. With it Markdown documentation is preserved regardless the spec format. Documentation in other formats is converted to HTML with JSON and LIBSPEC outputs and preserved with XML outputs, as earlier. Fixes robotframework#5808.
gaurav0107
marked this pull request as ready for review
November 2, 2026 00:26
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5808.
This adds a new
AUTOvalue to--specdocformatand makes it the default, following the design in the issue comments:RAWandHTMLwork as before. The programmaticlibdoc()API uses the same default whenspecdocformatis not given. Because nothing is converted, generating JSON or*.libspecspecs for Markdown libraries (including the standard libraries) no longer needs themarkdownmodule.For example,
libdoc String String.jsonandlibdoc String String.libspecnow havedocFormat/formatMARKDOWNinstead ofHTML. Use--specdocformat HTMLto keep converting Markdown to HTML.Docs:
libdoc --helpand thelibdoc()docstring describeAUTO.libspecand JSON spec sections were adjusted to match.Tests:
XML/AUTO output,LIBSPEC/AUTO outputandJSON/AUTO outputinlibdoc/doc_format.robot, covering Robot, HTML and Markdown source formats with the default and explicit-s AUTO.libdoc/cli.robot: the*.libspecdefault test now uses a Robot-format library, plus new cases for Markdown with*.libspecand explicit--specdocformat AUTO.libdoc/doc_string.robot: the JSON HTML-docs tests pass--spec-doc-format HTMLexplicitly, and a new test checks that Markdown is preserved by default.libdoc/invalid_usage.robot: updated error message.TestLibdoc.test_specdocformatfor the programmatic API.Ran
python atest/run.py --exclude no-ci atest/robot/libdoc(464 passed) andpython utest/run.py(all passed) on Python 3.12, plusruff checkonsrc atest utest.🤖 Opened with Superhuman, an open-source contribution agent.