Repository navigation
fix(python,ruby): stop escaping the README getting started guide - #2100
Merged
Merged
Conversation
🟢 Tier S · Ready to merge
Python and Ruby README templates now trim getting-started Markdown before marking it raw, preserving Markdown syntax in generated READMEs. The generation suite adds coverage checking that guide content is rendered verbatim across README outputs.
📂 Walkthrough · 3
Reviewed |
3 tasks
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.
What does this PR do?
The Python and Ruby README templates rendered the getting-started guide with
{{ sdk.gettingStarted|raw|trim }}.trimruns afterraw, so its output loses the safe marking and Twig HTML-escapes it. Every fenced example in those READMEs showed',<REGION>and=>instead of real code, so nothing could be copied (reported by Hansi on appwrite/sdk-for-python#165, appwrite/sdk-for-ruby#80 and appwrite/sdk-for-console-python#20). Every other template already uses|trim|raw; this switches the two templates to match.Test Plan
testReadmeRendersTheGuideVerbatimin the Generation suite renders a guide and examples containing quotes, angle brackets,&and=>for every README-producing language and checksREADME.md(andexample/README.mdwhere generated) contains it verbatim. Without the fix it fails forrubyandpythononly; with it all 17 pass.vendor/bin/phpunit --testsuite Generation,composer lint-twig,composer refactor:check,composer lint,max-line-length.sh . 1200 "*.twig"pythonandrubyserver: no HTML entities left in either READMERelated PRs and Issues
Closes #2102