Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions phases/00-setup-and-tooling/10-terminal-and-shell/docs/en.md
Original file line number Diff line number Diff line change
@@ -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.


> The terminal is where AI engineers live. Get comfortable here.

Expand Down Expand Up @@ -101,7 +101,7 @@ The three redirects you need:
| `>>` | Append stdout to file |
| `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.


### Step 3: Background processes

Expand Down