Skip to content

Add <webwork> to preserve-space (verbatimTags) in format package#164

Merged
oscarlevin merged 3 commits intomainfrom
copilot/add-latex-image-to-preserve-space
Mar 22, 2026
Merged

Add <webwork> to preserve-space (verbatimTags) in format package#164
oscarlevin merged 3 commits intomainfrom
copilot/add-latex-image-to-preserve-space

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

The format package's verbatimTags list controls which elements have their content preserved (not joined/reformatted). <latex-image> was already present; <webwork> was missing.

Changes

  • packages/format/src/lib/docStructure.ts: Added "webwork" to verbatimTags

This ensures the joinLines pass in the formatter does not collapse lines inside <webwork> blocks, preserving the structure of pg-code and mixed content:

<webwork>
  <pg-code>
    $a = random(1, 10, 1);
    $b = random(1, 10, 1);
  </pg-code>
  <statement>
    <p>What is <m><var name="$a"/> + <var name="$b"/></m>?</p>
  </statement>
</webwork>

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.nx.app
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./bin/post-install (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/pretext-tools/pretext-tools/node_modules/.bin/nx run format:test (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add <latex-image> to list of preserve-space for formatting.</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@oscarlevin This is now part of the format package.

Also should add webwork here.</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: oscarlevin <6504596+oscarlevin@users.noreply.github.com>
Copilot AI changed the title [WIP] Add latex-image to preserve-space formatting Add <webwork> to preserve-space (verbatimTags) in format package Mar 20, 2026
Copilot AI requested a review from oscarlevin March 20, 2026 15:28
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 22, 2026

View your CI Pipeline Execution ↗ for commit 3e21cdb

Command Status Duration Result
nx affected -t build ✅ Succeeded 11s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-22 23:30:30 UTC

@oscarlevin oscarlevin marked this pull request as ready for review March 22, 2026 23:30
@oscarlevin oscarlevin merged commit 4cce226 into main Mar 22, 2026
2 checks passed
@oscarlevin oscarlevin deleted the copilot/add-latex-image-to-preserve-space branch March 22, 2026 23:30
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.

Add <latex-image> to list of preserve-space for formatting.

2 participants