Stop truncating theory pages at the first exercise without a description - #322
Merged
Merged
Conversation
theory_creator concatenated each argument's exercise descriptions into
_theory.md but hit break on the first exercise without one, abandoning the
rest of the folder. 27 arguments have described exercises after an
undescribed one, so their theory never reached learners in any locale -
e.g. trim()/trimStart()/trimEnd() in javascript/strings, returning a
closure in swift/lambda, typed empty map literals in dart/maps.
break -> continue. Regenerating is purely additive: 326 _theory.md files,
17051 insertions, 0 deletions.
Review of the newly surfaced text found three factual errors, fixed here:
- dart/comments/6.md claimed the analyser ignores doc-comment prose unless
bracketed; brackets are reference syntax, not a filter.
- python/errorHandling/15.md claimed raising a new exception throws away
the original traceback, contradicting the same argument's 'raise ... from e'
explanation.
- es/python/conditionalStatements/{7,16,35}.md claimed Python requires the
if condition in parentheses.
This was referenced Sep 17, 2026
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.
theory_creatorbuilds each argument's_theory.mdby concatenating the# --description--of every exercise in order. On the first exercise without one it ranbreak, abandoning the rest of the folder.Most arguments only describe their first few exercises, so
breakandcontinueusually agree. But 27 arguments have a described exercise after an undescribed one, and that text never reached learners in any of the 12 locales:en/javascript/strings/11.mdtrim()/trimStart()/trimEnd()en/swift/lambda/12.mden/dart/maps/9.md<K, V>{}Change
One line —
break→continue— plus regenerated theory. The regeneration is purely additive: 326_theory.mdfiles, 17051 insertions, 0 deletions. No existing theory text changes content or order.Errors found in the newly surfaced text
Independent review of the recovered paragraphs caught three factual errors, fixed here (en + all 11 locales):
dart/comments/6.mdclaimed "the analyser ignores all text unless it is enclosed in square brackets". Brackets are reference syntax; ordinary prose is kept as documentation.python/errorHandling/15.mdclaimed raising a new exception "throws away the original traceback" — contradicting the same argument's laterraise ... from eexplanation. Python keeps the original as__context__.es/python/conditionalStatements/{7,16,35}.mdclaimed Python requires theifcondition in parentheses. (es/javascript/conditionalStatementsuses the same wording and was left alone — JS does require them.)Checks
+275436: All tests passed!dart analyzeon theory_creator: no issuesgit diff --numstatover*_theory.md: 0 deletions across all 326 filesKnown, not fixed here
scripts/check_locales.pyreports 11 falseDIFF … [answers]ondart/comments/6.md. Itsstrip_comments()deliberately refuses to enter block-comment state when no closing*/exists, so the/*and/**multiple-choice tokens in that exercise keep their (legitimately translated) text. Not run in CI; pre-existing.--description--blocks with noencounterpart, machine-generated filler confined toes/{python,javascript}/conditionalStatements. 43 become visible with this change. Only the factually wrong ones are corrected here; whether to keep or drop the rest is a content call.