Skip to content

Commit

Permalink
Use <img> tags for all images instead of Markdown image links.
Browse files Browse the repository at this point in the history
  • Loading branch information
munificent committed Aug 26, 2020
1 parent 491ba27 commit 835d0a9
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 29 deletions.
3 changes: 2 additions & 1 deletion asset/style.scss
Expand Up @@ -377,7 +377,8 @@ aside {
margin: 20px 0;
}

p:first-child {
p:first-child,
img:first-child {
margin-top: 4px;
}

Expand Down
2 changes: 1 addition & 1 deletion book/classes.md
Expand Up @@ -83,7 +83,7 @@ stamina.

<aside name="circle">

![The relationships between classes, methods, instances, constructors, and fields.](image/classes/circle.png)
<img src="image/classes/circle.png" alt="The relationships between classes, methods, instances, constructors, and fields.">

It's like the circle of life, *sans* Sir Elton John.

Expand Down
2 changes: 1 addition & 1 deletion book/evaluating-expressions.md
Expand Up @@ -431,7 +431,7 @@ the way out.

I don't know, man, *can* you negate a muffin?

![A muffin, negated.](image/evaluating-expressions/muffin.png)
<img src="image/evaluating-expressions/muffin.png" alt="A muffin, negated.">

</aside>

Expand Down
4 changes: 2 additions & 2 deletions book/inheritance.md
Expand Up @@ -66,7 +66,7 @@ instances contains the set of all BostonCream instances since every BostonCream
is also a Doughnut. So BostonCream is a subclass, and a subtype, and its
instances are a subset. It all lines up.

![Boston cream <: doughnut.](image/inheritance/doughnuts.png)
<img src="image/inheritance/doughnuts.png" alt="Boston cream <: doughnut.">

</aside>

Expand Down Expand Up @@ -610,7 +610,7 @@ implemented...

<aside name="superhero">

![You, being your bad self.](image/inheritance/superhero.png)
<img src="image/inheritance/superhero.png" alt="You, being your bad self.">

</aside>

Expand Down
4 changes: 2 additions & 2 deletions book/introduction.md
Expand Up @@ -200,7 +200,7 @@ Yacc wasn't the first of its ilk, which is why it's named "Yacc" -- *Yet
Another* Compiler-Compiler. A later similar tool is [Bison][], named as a pun on
the pronunciation of Yacc like "yak".

![A yak.](image/introduction/yak.png)
<img src="image/introduction/yak.png" alt="A yak.">

[bison]: https://en.wikipedia.org/wiki/GNU_bison

Expand Down Expand Up @@ -374,7 +374,7 @@ compile future versions of itself and you can discard the original one compiled
from the other compiler. This is called **"bootstrapping"** from the image of
pulling yourself up by your own bootstraps.

![Fact: This is the primary mode of transportation of the American cowboy.](image/introduction/bootstrap.png)
<img src="image/introduction/bootstrap.png" alt="Fact: This is the primary mode of transportation of the American cowboy.">

</aside>

Expand Down
4 changes: 2 additions & 2 deletions book/parsing-expressions.md
Expand Up @@ -404,7 +404,7 @@ Confusingly, we also use direction metaphorically when talking about "high" and
reach the lowest-precedence expressions first because they may in turn contain
subexpressions of higher precedence.

![Top-down grammar rules in order of increasing precedence.](image/parsing-expressions/direction.png)
<img src="image/parsing-expressions/direction.png" alt="Top-down grammar rules in order of increasing precedence.">

CS people really need to get together and straighten out their metaphors. Don't
even get me started on which direction the stack is supposed to grow.
Expand Down Expand Up @@ -697,7 +697,7 @@ issue. Simple, fast error recovery is fine.

You know you want to push it.

![A big shiny "PANIC" button.](image/parsing-expressions/panic.png)
<img src="image/parsing-expressions/panic.png" alt="A big shiny 'PANIC' button.">

</aside>

Expand Down
2 changes: 1 addition & 1 deletion book/types-of-values.md
Expand Up @@ -204,7 +204,7 @@ data between Lox's dynamic world and C's static one.

<aside name="universe">

![The earthly C firmament with the Lox heavens above.](image/types-of-values/universe.png)
<img src="image/types-of-values/universe.png" alt="The earthly C firmament with the Lox heavens above.">

The `_VAL` macros lift a C value into the heavens. The `AS_` macros bring it
back down.
Expand Down
3 changes: 1 addition & 2 deletions site/classes.html
Expand Up @@ -178,8 +178,7 @@ <h3><a href="#oop-and-classes" name="oop-and-classes"><small>12&#8202;.&#8202;0&
still have a lot to get through. This is a big chapter and everything doesn&rsquo;t
quite come together until we have all of the above pieces, so gather your
stamina.</p>
<aside name="circle">
<p><img src="image/classes/circle.png" alt="The relationships between classes, methods, instances, constructors, and fields." /></p>
<aside name="circle"><img src="image/classes/circle.png" alt="The relationships between classes, methods, instances, constructors, and fields.">
<p>It&rsquo;s like the circle of life, <em>sans</em> Sir Elton John.</p>
</aside>
<h2><a href="#class-declarations" name="class-declarations"><small>12&#8202;.&#8202;1</small>Class Declarations</a></h2>
Expand Down
3 changes: 1 addition & 2 deletions site/evaluating-expressions.html
Expand Up @@ -574,8 +574,7 @@ <h2><a href="#runtime-errors" name="runtime-errors"><small>7&#8202;.&#8202;3</sm
So when a runtime error occurs deep in some expression, we need to escape all
the way out.</p>
<aside name="muffin">
<p>I don&rsquo;t know, man, <em>can</em> you negate a muffin?</p>
<p><img src="image/evaluating-expressions/muffin.png" alt="A muffin, negated." /></p>
<p>I don&rsquo;t know, man, <em>can</em> you negate a muffin?</p><img src="image/evaluating-expressions/muffin.png" alt="A muffin, negated.">
</aside>
<p>We could print a runtime error and then abort the process and exit the
application entirely. That has a certain melodramatic flair. Sort of the
Expand Down
6 changes: 2 additions & 4 deletions site/inheritance.html
Expand Up @@ -160,8 +160,7 @@ <h2><a href="#superclasses-and-subclasses" name="superclasses-and-subclasses"><s
<p>Think of a type as the set of all values of that type. The set of all Doughnut
instances contains the set of all BostonCream instances since every BostonCream
is also a Doughnut. So BostonCream is a subclass, and a subtype, and its
instances are a subset. It all lines up.</p>
<p><img src="image/inheritance/doughnuts.png" alt="Boston cream &lt;: doughnut." /></p>
instances are a subset. It all lines up.</p><img src="image/inheritance/doughnuts.png" alt="Boston cream <: doughnut.">
</aside>
<p>Our first step towards supporting inheritance in Lox is a way to specify a
superclass when declaring a class. There&rsquo;s a lot of variety in syntax for this.
Expand Down Expand Up @@ -895,8 +894,7 @@ <h2><a href="#conclusion" name="conclusion"><small>13&#8202;.&#8202;4</small>Con
<li>methods,</li>
<li>and finally inheritance.</li>
</ul>
<aside name="superhero">
<p><img src="image/inheritance/superhero.png" alt="You, being your bad self." /></p>
<aside name="superhero"><img src="image/inheritance/superhero.png" alt="You, being your bad self.">
</aside>
<p>We did all of that from scratch, with no external dependencies or magic tools.
Just you and I, our respective text editors, a couple of collection classes in
Expand Down
6 changes: 2 additions & 4 deletions site/introduction.html
Expand Up @@ -257,8 +257,7 @@ <h3><a href="#the-code" name="the-code"><small>1&#8202;.&#8202;2&#8202;.&#8202;1
where we get the term &ldquo;compiler-compiler&rdquo;.</p>
<p>Yacc wasn&rsquo;t the first of its ilk, which is why it&rsquo;s named &ldquo;Yacc&rdquo;<span class="em">&mdash;</span><em>Yet
Another</em> Compiler-Compiler. A later similar tool is <a href="https://en.wikipedia.org/wiki/GNU_bison">Bison</a>, named as a pun on
the pronunciation of Yacc like &ldquo;yak&rdquo;.</p>
<p><img src="image/introduction/yak.png" alt="A yak." /></p>
the pronunciation of Yacc like &ldquo;yak&rdquo;.</p><img src="image/introduction/yak.png" alt="A yak.">
<p>If you find all of these little self-references and puns charming and fun,
you&rsquo;ll fit right in here. If not, well, maybe the language nerd sense of humor
is an acquired taste.</p>
Expand Down Expand Up @@ -385,8 +384,7 @@ <h2><a href="#the-first-interpreter" name="the-first-interpreter"><small>1&#8202
compiler once. Now you can use the compiled version of your own compiler to
compile future versions of itself and you can discard the original one compiled
from the other compiler. This is called <strong>&ldquo;bootstrapping&rdquo;</strong> from the image of
pulling yourself up by your own bootstraps.</p>
<p><img src="image/introduction/bootstrap.png" alt="Fact: This is the primary mode of transportation of the American cowboy." /></p>
pulling yourself up by your own bootstraps.</p><img src="image/introduction/bootstrap.png" alt="Fact: This is the primary mode of transportation of the American cowboy.">
</aside>
<p>And, finally, Java is hugely popular. That means there&rsquo;s a good chance you
already know it, so there&rsquo;s less for you to learn to get going in the book. If
Expand Down
6 changes: 2 additions & 4 deletions site/parsing-expressions.html
Expand Up @@ -425,8 +425,7 @@ <h2><a href="#recursive-descent-parsing" name="recursive-descent-parsing"><small
Confusingly, we also use direction metaphorically when talking about &ldquo;high&rdquo; and
&ldquo;low&rdquo; precedence, but the orientation is reversed. In a top-down parser, you
reach the lowest-precedence expressions first because they may in turn contain
subexpressions of higher precedence.</p>
<p><img src="image/parsing-expressions/direction.png" alt="Top-down grammar rules in order of increasing precedence." /></p>
subexpressions of higher precedence.</p><img src="image/parsing-expressions/direction.png" alt="Top-down grammar rules in order of increasing precedence.">
<p>CS people really need to get together and straighten out their metaphors. Don&rsquo;t
even get me started on which direction the stack is supposed to grow.</p>
</aside>
Expand Down Expand Up @@ -818,8 +817,7 @@ <h2><a href="#syntax-errors" name="syntax-errors"><small>6&#8202;.&#8202;3</smal
issue. Simple, fast error recovery is fine.</p>
<h3><a href="#panic-mode-error-recovery" name="panic-mode-error-recovery"><small>6&#8202;.&#8202;3&#8202;.&#8202;1</small>Panic mode error recovery</a></h3>
<aside name="panic">
<p>You know you want to push it.</p>
<p><img src="image/parsing-expressions/panic.png" alt="A big shiny &ldquo;PANIC&rdquo; button." /></p>
<p>You know you want to push it.</p><img src="image/parsing-expressions/panic.png" alt="A big shiny 'PANIC' button.">
</aside>
<p>Of all the recovery techniques devised in yesteryear, the one that best stood
the test of time is called<span class="em">&mdash;</span>somewhat alarmingly<span class="em">&mdash;</span><span name="panic">&ldquo;panic
Expand Down
3 changes: 2 additions & 1 deletion site/style.css
Expand Up @@ -768,7 +768,8 @@ aside {
aside p {
margin: 20px 0;
}
aside p:first-child {
aside p:first-child,
aside img:first-child {
margin-top: 4px;
}
aside p:last-child {
Expand Down
3 changes: 1 addition & 2 deletions site/types-of-values.html
Expand Up @@ -335,8 +335,7 @@ <h2><a href="#lox-values-and-c-values" name="lox-values-and-c-values"><small>18&
type. Any time we call one of the <code>AS_</code> macros, we need to guard it behind a
call to one of these first. With these eight macros, we can now safely shuttle
data between Lox&rsquo;s dynamic world and C&rsquo;s static one.</p>
<aside name="universe">
<p><img src="image/types-of-values/universe.png" alt="The earthly C firmament with the Lox heavens above." /></p>
<aside name="universe"><img src="image/types-of-values/universe.png" alt="The earthly C firmament with the Lox heavens above.">
<p>The <code>_VAL</code> macros lift a C value into the heavens. The <code>AS_</code> macros bring it
back down.</p>
</aside>
Expand Down

0 comments on commit 835d0a9

Please sign in to comment.