Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support semantic markup for roles #9

Merged

Conversation

felixfontein
Copy link
Collaborator

Implements proposal from ansible-community/antsibull-docs#113.

Copy link
Collaborator

@gotmax23 gotmax23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said, I'm not super familiar with this codebase, but here are some suggestions.

src/antsibull_docs_parser/dom.py Show resolved Hide resolved
src/antsibull_docs_parser/dom.py Show resolved Hide resolved
if idx >= 0:
entrypoint = text[:idx]
text = text[idx + 1 :]
if entrypoint is None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be

Suggested change
if entrypoint is None:
if not entrypoint:

? I assume you'd also want a value like :abc (text[:idx] would be an empty string) to cause an error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know whether ansible-core allows empty entrypoints. (Considering how flexible roles are in general, I wouldn't be surprised if it does.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this as-is for now. If it turns out that ansible-core does not allow these we can stricten the parsing rules later.

src/antsibull_docs_parser/parser.py Outdated Show resolved Hide resolved
changelogs/fragments/9-semantic-markup-roles.yml Outdated Show resolved Hide resolved
@felixfontein felixfontein marked this pull request as ready for review March 27, 2023 19:40
@felixfontein felixfontein merged commit 596ea7f into ansible-community:main Mar 27, 2023
@felixfontein
Copy link
Collaborator Author

@gotmax23 thanks for reviewing this!

@felixfontein felixfontein deleted the semantic-markup-roles branch March 27, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants