Skip to content

Fix CI failure: escape inline <pre data-test="exec"> in linguistics-asia READMEs#1960

Merged
esolitos merged 2 commits into
masterfrom
copilot/fix-github-actions-job-test
Jun 18, 2026
Merged

Fix CI failure: escape inline <pre data-test="exec"> in linguistics-asia READMEs#1960
esolitos merged 2 commits into
masterfrom
copilot/fix-github-actions-job-test

Conversation

Copilot AI commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The main / test CI job was crashing with ERROR: expected string or bytes-like object, got 'NoneType' when processing the new examples/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 Nonere.sub(pattern, value, None) throws TypeError.

Changes

  • 8 linguistics-asia/0*/README.md files: Escape the inline prose reference from <pre data-test="exec"> to &lt;pre data-test="exec"&gt; so BeautifulSoup doesn't create a phantom element.

  • test/test.py: Add a None guard in parse_cmds() to fail gracefully rather than crash if tag.string is ever None:

    def parse_cmds(pre, attrs):
        if pre is None:
            return []
        ...

Copilot AI changed the title [WIP] Fix failing GitHub Actions job for main / test Fix CI failure: escape inline <pre data-test="exec"> in linguistics-asia READMEs Jun 18, 2026
Copilot AI requested a review from esolitos June 18, 2026 11:29
Copilot AI temporarily deployed to Vespa Cloud CD June 18, 2026 11:55 Inactive
@esolitos esolitos marked this pull request as ready for review June 18, 2026 12:55
@esolitos esolitos requested review from bjormel and bjorncs June 18, 2026 12:56
@esolitos esolitos merged commit 42a7998 into master Jun 18, 2026
9 checks passed
@esolitos esolitos deleted the copilot/fix-github-actions-job-test branch June 18, 2026 14:13
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.

4 participants