Fix CI failure: escape inline <pre data-test="exec"> in linguistics-asia READMEs#1960
Merged
Merged
Conversation
…Es and add None guard in test.py
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job for main / test
Fix CI failure: escape inline Jun 18, 2026
<pre data-test="exec"> in linguistics-asia READMEs
esolitos
approved these changes
Jun 18, 2026
bjormel
approved these changes
Jun 18, 2026
bjorncs
approved these changes
Jun 18, 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.
The
main / testCI job was crashing withERROR: expected string or bytes-like object, got 'NoneType'when processing the newexamples/linguistics-asia/READMEs.Root cause: The test framework (
test/test.py) parses raw Markdown as HTML via BeautifulSoup. All 8 linguistics-asia READMEs contain`<pre data-test="exec">`in their prose description of the testing convention. BeautifulSoup interprets this as a real HTML tag, creating a phantom<pre data-test="exec">element that wraps the subsequent text and actual test blocks. This element has multiple children →tag.string is None→re.sub(pattern, value, None)throwsTypeError.Changes
8
linguistics-asia/0*/README.mdfiles: Escape the inline prose reference from<pre data-test="exec">to<pre data-test="exec">so BeautifulSoup doesn't create a phantom element.test/test.py: Add aNoneguard inparse_cmds()to fail gracefully rather than crash iftag.stringis everNone: