Skip to content

fix: restore the quotation environment's inset - #38

Merged
pyramation merged 3 commits into
mainfrom
fix/quotation-inset
Aug 25, 2026
Merged

fix: restore the quotation environment's inset#38
pyramation merged 3 commits into
mainfrom
fix/quotation-inset

Conversation

@pyramation

Copy link
Copy Markdown
Collaborator

Summary

quotation lost its indent and 10pt size once paragraphize() started wrapping text runs in <p class="para">: the environment opened with a <p>, and isBlock matches a line starting with <p, so the opening tag was flushed as its own block and the quote body became a sibling paragraph. Rendered DOM before:

<p class="quotation"></p>          <!-- browser closes it immediately -->
<p class="para">Quoted text.</p>   <!-- p.quotation styles never apply -->

Fix is to make it a real wrapper — bq/eq emit <blockquote class="quotation">…</blockquote> — so the paragraphized lines nest inside it, with the CSS rule moved to the wrapper (same 15px inset / 0 0 20px margin / 10pt as before, inherited by the inner p.para).

That needs isBlock to match closing tags too (<\/?(h[1-6]|ul|…)), otherwise a bare </blockquote> line gets swallowed into the following paragraph run. Side effect, and an improvement: theorem-style environments no longer emit their </div> inside the paragraph.

-<p class="para">Theorem text.
-</div></p>
+<p class="para">Theorem text.</p>
+</div>

Site-visible on mathapedia.com's quoted passages (e.g. /books/31/sections/156/407) after a publish + dep bump.

Link to Devin session: https://app.devin.ai/sessions/e51e8ecb94d241bd8d89e65e642c3e43
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit f2e422e into main Aug 25, 2026
4 checks passed
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.

1 participant