-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support semantic markup for roles #9
Conversation
There was a problem hiding this 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.
if idx >= 0: | ||
entrypoint = text[:idx] | ||
text = text[idx + 1 :] | ||
if entrypoint is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
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.
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
Co-authored-by: Maxwell G <maxwell@gtmx.me>
@gotmax23 thanks for reviewing this! |
Implements proposal from ansible-community/antsibull-docs#113.