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
markdown ifversion bleeding into user view for workflow-syntax-for-github-actions example-3 #13040
Comments
|
@jsoref Thank you for opening this issue. We appreciate how you clearly mentioned what the issue is with screenshot and what could have caused it. I will get this triaged for a writers review |
|
Hi @jsoref - thanks for flagging this. I'm a little puzzled by this bug because I can see that this syntax usually works as expected (see source and output Configuring code scanning - Analyzing Python dependencies). I'll ask docs engineering to take a look as it seems like it may be a rendering bug rather than a bug in the source file. |
|
Thanks. Fwiw, my guess is that it's because you're inside a ``` block. |
|
That's what I wondered about too, but the example I linked in my comment uses the same syntax successfully so clearly this does normally work. I couldn't see an obvious difference in the source files for the correctly displayed and incorrectly displayed code blocks. |
|
It looks as if after the PR that you spotted was merged, a later PR added This issue can be fixed by moving the Is this something you're able to fix? If not, I'll update the description of the issue and add a |
|
Ah, missed the raw. |
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-3
What part(s) of the article would you like to see updated?
The
{% ifversion ... %}content shouldn't be rendered to end users, it appears like this to me:Click for an image showing the problem...
Additional information
I think this was introduced by: ad605a4
Added by a maintainer
Content design plan
The condition that's being wrongly displayed in the example was added by the commit highlighted by @jsoref. This condition originally worked as intended, however, a later commit added
{% raw %}tags around the whole example. This stopped the liquid versioning being parsed and means that it is now displayed.You can fix this problem by moving the
{% raw %}and{% endraw %}tags into the example, so that they just enclose${{ github.event.inputs.tag }}on line 329 instead of the whole example. As shown in the style guide example: https://github.com/github/docs-internal/blob/main/contributing/content-style-guide.md#code-blocks).The text was updated successfully, but these errors were encountered: