Skip to content

Fix xcancel and bcancel not rendering#128

Open
thomaskrabichler wants to merge 1 commit intosimpleclub:mainfrom
thomaskrabichler:fix/xcancel-bcancel-rendering
Open

Fix xcancel and bcancel not rendering#128
thomaskrabichler wants to merge 1 commit intosimpleclub:mainfrom
thomaskrabichler:fix/xcancel-bcancel-rendering

Conversation

@thomaskrabichler
Copy link
Copy Markdown

Problem

\xcancel and \bcancel commands don't render correctly.

Cause

Two bugs:

  1. Typo in enclosure.dart (line 98)
    'downdiagnoalstrike' should be 'downdiagonalstrike'

  2. Array syntax in enclose.dart (line 91)
    ['updiagonalstrike, downdiagonalstrike'] - comma is inside the string
    Should be: ['updiagonalstrike', 'downdiagonalstrike'] - two separate elements

Result

  • \bcancel now draws the correct diagonal
  • \xcancel now draws both diagonals

- Fix typo: 'downdiagnoalstrike' -> 'downdiagonalstrike' in
  enclosure.dart

- Fix array syntax: comma was inside string instead of separating elements in enclose.dart
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 31, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f6398ae0-9ae6-4e0f-ad9e-967f44efb32b

📥 Commits

Reviewing files that changed from the base of the PR and between 2f270ae and 98d7721.

📒 Files selected for processing (2)
  • lib/src/ast/nodes/enclosure.dart
  • lib/src/parser/tex/functions/katex_base/enclose.dart

📝 Walkthrough

Walkthrough

Two bug fixes related to mathematical notation handling in the LaTeX parser: correcting a typo in diagonal strike notation detection and restructuring the \xcancel strike mapping from a combined string to separate entries.

Changes

Cohort / File(s) Summary
Enclosure notation fixes
lib/src/ast/nodes/enclosure.dart
Fixed typo in enclosure notation check from 'downdiagnoalstrike' to 'downdiagonalstrike' to correctly gate the diagonal strike rendering branch.
Cancel function notation mapping
lib/src/parser/tex/functions/katex_base/enclose.dart
Separated \xcancel strike notation mapping from a single combined string 'updiagonalstrike, downdiagonalstrike' into two distinct entries for proper parsing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix xcancel and bcancel not rendering' directly summarizes the main objective of the PR: fixing rendering issues with the \xcancel and \bcancel LaTeX commands.
Description check ✅ Passed The description clearly explains the problem (rendering issues with \xcancel and \bcancel), identifies two specific bugs with line numbers and code examples, and explains the expected results after fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants