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

Specify code listings are Swift #333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amartini51
Copy link
Member

@amartini51 amartini51 commented Sep 27, 2024

Because the Info.plist file specifies Swift as the default language via the CDDefaultCodeListingLanguage key, code listings with an unspecified language should still render correctly. However, it's still good to be explicit and makes the markdown files more usable by other toolchains.

Used the following script to find code listings that were missing an explicit language, and to verify that none remain after this change:

echo "Not specified as Swift"
cmark --to xml TSPL.docc/*/*.md |
xpath -q -n -e '//code_block[not(@info="swift")]'

echo "Languages used"
cmark --to xml TSPL.docc/*/*.md |
xpath -q -n -e '//code_block/@info' |
sort -u

@amartini51
Copy link
Member Author

amartini51 commented Sep 27, 2024

Thank you to @liyanage for pointing one of these out, which prompted me to check the rest.

@amartini51 amartini51 changed the title Specify code listing are Swift Specify code listings are Swift Sep 27, 2024
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.

1 participant