Skip to content

fix: pipe symbol markdown table rendering on terminal docs#161

Open
sultanfariz wants to merge 1 commit into
rohitg00:mainfrom
sultanfariz:fix/pipe-symbol-markdown-table
Open

fix: pipe symbol markdown table rendering on terminal docs#161
sultanfariz wants to merge 1 commit into
rohitg00:mainfrom
sultanfariz:fix/pipe-symbol-markdown-table

Conversation

@sultanfariz
Copy link
Copy Markdown

Line 104 uses \| which breaks table rendering — pipe conflicts with table cell delimiter. Replace with <code>&#124;</code> for correct rendering.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR makes two minor rendering adjustments to the Terminal & Shell documentation file. The main heading gains a leading invisible character, and the pipe operator symbol in a reference table changes from escaped text notation to an HTML entity rendering.

Changes

Documentation Rendering Fixes

Layer / File(s) Summary
Heading and Symbol Rendering Adjustments
phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md
The "Terminal & Shell" heading line gains a leading invisible character before the # marker. The pipe operator in the symbol reference table changes from escaped | to HTML <code>&#124;</code> rendering.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the specific fix: correcting pipe symbol rendering in a markdown table on the terminal documentation.
Description check ✅ Passed The description accurately explains the problem (pipe character breaking table rendering) and the solution (replacing with HTML entity), directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md`:
- Line 104: The pipe symbol representation is inconsistent: one table cell uses
the HTML entity &`#124`; (rendered as <code>&`#124`;</code>) while another uses a
backticked escaped pipe ```\|``; update the Key Terms table entry that currently
shows ```\|``` to use the same HTML entity approach (replace the backticked
escaped pipe with the HTML entity representation) so both table cells use
<code>&`#124`;</code>, or if you prefer the backtick style, change the cell that
uses &`#124`; to the backticked ```\|``` form—whichever you choose, make both
occurrences for the pipe operator (the cell showing the symbol and the
description "Send stdout of one command as stdin to the next") consistent.
- Line 104: The table cell currently uses an HTML entity inside a code tag
("&`#124`;") which the lesson renderer escapes; update the table row so the cell
contains an inline-code rendered box-drawing vertical bar character (U+2502)
instead of the entity — i.e. replace the <code>&`#124`;</code> cell with an
inline-code cell containing the glyph "│" so it displays as a styled pipe in the
rendered table.
- Line 1: Remove the invisible BOM/U+FEFF at the start of the "Terminal & Shell"
heading so the line begins with a literal "#" character; the renderer's heading
matcher (/^# (.+)/) requires the "#" to be the first character, so open the file
containing the "Terminal & Shell" H1 and delete the leading invisible character
(or re-save the file without a BOM/UTF-8-BOM) so the line matches the /^# (.+)/
regex and the TOC/header rendering works correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 69deebf5-a2c8-4293-af4a-f3259c39a77c

📥 Commits

Reviewing files that changed from the base of the PR and between 4415dc8 and 032682f.

📒 Files selected for processing (1)
  • phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md

@@ -1,4 +1,4 @@
# Terminal & Shell
# Terminal & Shell
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Leading invisible character breaks heading rendering.

The line starts with an invisible character (appears to be a BOM/U+FEFF) before the # marker. Based on the renderer in site/lesson.html:2240, the heading regex /^# (.+)/ expects the line to start with #. This leading character will prevent the pattern from matching, breaking H1 rendering and TOC generation entirely.

🔧 Proposed fix
-# Terminal & Shell
+# Terminal & Shell

As per coding guidelines, the renderer matches headings with /^# (.+)/ (site/lesson.html:2240), requiring # at line start.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Terminal & Shell
# Terminal & Shell
🧰 Tools
🪛 LanguageTool

[grammar] ~1-~1: Ensure spelling is correct
Context: # Terminal & Shell > The terminal is where AI engineers live...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md` at line 1,
Remove the invisible BOM/U+FEFF at the start of the "Terminal & Shell" heading
so the line begins with a literal "#" character; the renderer's heading matcher
(/^# (.+)/) requires the "#" to be the first character, so open the file
containing the "Terminal & Shell" H1 and delete the leading invisible character
(or re-save the file without a BOM/UTF-8-BOM) so the line matches the /^# (.+)/
regex and the TOC/header rendering works correctly.

| `2>` | Write stderr to file |
| `2>&1` | Send stderr to same place as stdout |
| `\|` | Send stdout of one command as stdin to the next |
| <code>&#124;</code> | Send stdout of one command as stdin to the next |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Ensure consistency with pipe symbol representation in line 341.

Line 341 in the Key Terms table also shows the pipe operator as `\|` within a table cell. If the HTML entity approach at line 104 is confirmed to work correctly, line 341 should be updated to match for consistency. If the approach doesn't work, both locations need the same fix.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md` at line 104,
The pipe symbol representation is inconsistent: one table cell uses the HTML
entity &`#124`; (rendered as <code>&`#124`;</code>) while another uses a backticked
escaped pipe ```\|``; update the Key Terms table entry that currently shows
```\|``` to use the same HTML entity approach (replace the backticked escaped
pipe with the HTML entity representation) so both table cells use
<code>&`#124`;</code>, or if you prefer the backtick style, change the cell that
uses &`#124`; to the backticked ```\|``` form—whichever you choose, make both
occurrences for the pipe operator (the cell showing the symbol and the
description "Send stdout of one command as stdin to the next") consistent.

⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoff

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Extract and examine the table rendering logic and test the pipe symbol cell

echo "=== Checking inline formatter escape order ==="
rg -A 15 'function inlineFormat' site/lesson.html

echo -e "\n=== Checking table cell processing ==="
rg -B 5 -A 10 'cells.*split.*\|' site/lesson.html

echo -e "\n=== Looking for any special HTML passthrough logic ==="
rg -C 3 'innerHTML|dangerouslySet|raw.*html' site/lesson.html

Repository: rohitg00/ai-engineering-from-scratch

Length of output: 8118


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Locate table rendering function and where inlineFormat is applied ==="
rg -n "function flushTable|flushTable\\(" site/lesson.html

echo -e "\n=== Show flushTable implementation ==="
rg -n "function flushTable\\b" -n site/lesson.html --context 8

echo -e "\n=== Find where table cells are passed through inlineFormat ==="
rg -n "inlineFormat\\(.*\\bcell|inlineFormat\\(.*\\bc\\b|inlineFormat\\(c\\b|inlineFormat\\(\\w+\\)" site/lesson.html | head -n 50

echo -e "\n=== Inspect parseMd / parseMd pipeline around table handling ==="
rg -n "function parseMd\\b|parseMd\\(" site/lesson.html
rg -n "inTable|tableRows" site/lesson.html --context 3

Repository: rohitg00/ai-engineering-from-scratch

Length of output: 3490


🏁 Script executed:

#!/bin/bash
set -euo pipefail
sed -n '95,112p' phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md | cat -n

Repository: rohitg00/ai-engineering-from-scratch

Length of output: 720


Fix rendering of the pipe symbol in the redirect table.

<code>&#124;</code> won’t render as a styled | because the lesson markdown renderer escapes HTML/entities in inlineFormat() before inserting table cell HTML; the entity/tag is therefore output as literal text. Replace the cell with a non-entity glyph, e.g. `│`.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md` at line 104,
The table cell currently uses an HTML entity inside a code tag ("&`#124`;") which
the lesson renderer escapes; update the table row so the cell contains an
inline-code rendered box-drawing vertical bar character (U+2502) instead of the
entity — i.e. replace the <code>&`#124`;</code> cell with an inline-code cell
containing the glyph "│" so it displays as a styled pipe in the rendered table.

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