Skip to content

Commit d5f4e0b

Browse files
PyMite6941claude
andcommitted
Fix code blocks in Day22 and Day23 to use manual br/nbsp formatting
Replace <pre><code> with inline <br /> line breaks and &nbsp; indentation so the code displays correctly with the site's existing CSS styling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f735d37 commit d5f4e0b

2 files changed

Lines changed: 51 additions & 47 deletions

File tree

pages/30DaysOfAIProgrammingPrompts/Day22.html

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,41 +51,43 @@ <h2 style="text-align: center">Description</h2>
5151
<h3 style="text-align: center; font-size: 30px">View the source code</h3>
5252
<br />
5353
<div class="code-segment">
54-
<pre style="margin: 0; overflow-x: auto"><code>#!/bin/bash
55-
56-
echo "Setup Project Directories Program"
57-
echo
58-
echo "What is the name of your project?"
59-
read -p "&gt; " name
60-
echo "What is the project language?"
61-
read -p "&gt; " language
62-
63-
if [ "$language" = "python" ]; then
64-
mkdir "$name"
65-
cd "$name" || exit
66-
git init
67-
cat &gt; main.py &lt;&lt; 'EOF'
68-
print('Hello, World!')
69-
EOF
70-
python main.py
71-
elif [ "$language" = "go" ]; then
72-
mkdir "$name"
73-
cd "$name" || exit
74-
git init
75-
go mod init "$name"
76-
touch main.go
77-
code main.go
78-
elif [ "$language" = "react" ]; then
79-
npx create-react-app "$name"
80-
cd "$name" || exit
81-
code .
82-
elif [ "$language" = "rust" ]; then
83-
cargo new "$name"
84-
cd "$name/src" || exit
85-
code main.rs
86-
else
87-
echo "Language not supported"
88-
fi</code></pre>
54+
<code>
55+
#!/bin/bash<br />
56+
<br />
57+
echo "Setup Project Directories Program"<br />
58+
echo<br />
59+
echo "What is the name of your project?"<br />
60+
read -p "&gt; " name<br />
61+
echo "What is the project language?"<br />
62+
read -p "&gt; " language<br />
63+
<br />
64+
if [ "$language" = "python" ]; then<br />
65+
&nbsp;&nbsp;&nbsp;&nbsp;mkdir "$name"<br />
66+
&nbsp;&nbsp;&nbsp;&nbsp;cd "$name" || exit<br />
67+
&nbsp;&nbsp;&nbsp;&nbsp;git init<br />
68+
&nbsp;&nbsp;&nbsp;&nbsp;cat &gt; main.py &lt;&lt; 'EOF'<br />
69+
print('Hello, World!')<br />
70+
EOF<br />
71+
&nbsp;&nbsp;&nbsp;&nbsp;python main.py<br />
72+
elif [ "$language" = "go" ]; then<br />
73+
&nbsp;&nbsp;&nbsp;&nbsp;mkdir "$name"<br />
74+
&nbsp;&nbsp;&nbsp;&nbsp;cd "$name" || exit<br />
75+
&nbsp;&nbsp;&nbsp;&nbsp;git init<br />
76+
&nbsp;&nbsp;&nbsp;&nbsp;go mod init "$name"<br />
77+
&nbsp;&nbsp;&nbsp;&nbsp;touch main.go<br />
78+
&nbsp;&nbsp;&nbsp;&nbsp;code main.go<br />
79+
elif [ "$language" = "react" ]; then<br />
80+
&nbsp;&nbsp;&nbsp;&nbsp;npx create-react-app "$name"<br />
81+
&nbsp;&nbsp;&nbsp;&nbsp;cd "$name" || exit<br />
82+
&nbsp;&nbsp;&nbsp;&nbsp;code .<br />
83+
elif [ "$language" = "rust" ]; then<br />
84+
&nbsp;&nbsp;&nbsp;&nbsp;cargo new "$name"<br />
85+
&nbsp;&nbsp;&nbsp;&nbsp;cd "$name/src" || exit<br />
86+
&nbsp;&nbsp;&nbsp;&nbsp;code main.rs<br />
87+
else<br />
88+
&nbsp;&nbsp;&nbsp;&nbsp;echo "Language not supported"<br />
89+
fi
90+
</code>
8991
</div>
9092
<br />
9193
<a

pages/30DaysOfAIProgrammingPrompts/Day23.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,20 @@ <h2 style="text-align: center">Description</h2>
5252
<h3 style="text-align: center; font-size: 30px">View the source code</h3>
5353
<br />
5454
<div class="code-segment">
55-
<pre style="margin: 0; overflow-x: auto"><code>#!/bin/bash
56-
57-
message=$1
58-
59-
if [ -z "$message" ]; then
60-
echo "Usage: gq 'commit message here'"
61-
exit 1
62-
else
63-
git add .
64-
git commit -m "$message"
65-
echo "Committing: $message"
66-
fi</code></pre>
55+
<code>
56+
#!/bin/bash<br />
57+
<br />
58+
message=$1<br />
59+
<br />
60+
if [ -z "$message" ]; then<br />
61+
&nbsp;&nbsp;&nbsp;&nbsp;echo "Usage: gq 'commit message here'"<br />
62+
&nbsp;&nbsp;&nbsp;&nbsp;exit 1<br />
63+
else<br />
64+
&nbsp;&nbsp;&nbsp;&nbsp;git add .<br />
65+
&nbsp;&nbsp;&nbsp;&nbsp;git commit -m "$message"<br />
66+
&nbsp;&nbsp;&nbsp;&nbsp;echo "Committing: $message"<br />
67+
fi
68+
</code>
6769
</div>
6870
<br />
6971
<a

0 commit comments

Comments
 (0)