Skip to content

Commit c53379e

Browse files
committed
Add a test using full fontawesome type names
In version 6, Font Awesome changed so that the class names look like `fa-solid fa-cat` instead of `fas fa-cat`. mdBook is not handling the new style.
1 parent 6bf7fad commit c53379e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

tests/testsuite/rendering.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ fn fontawesome() {
5353
INFO Book building has started
5454
INFO Running the html backend
5555
WARN failed to find Font Awesome icon for icon `does-not-exist` with type `regular` in `fa.md`: Invalid Font Awesome icon name: visit https://fontawesome.com/icons?d=gallery&m=free to see valid names
56+
WARN failed to find Font Awesome icon for icon `cat` with type `regular` in `fa.md`: Invalid Font Awesome icon name: visit https://fontawesome.com/icons?d=gallery&m=free to see valid names
5657
INFO HTML book written to `[ROOT]/book`
5758
5859
"#]]);

tests/testsuite/rendering/fontawesome/expected/fa.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ <h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>
33
<p><span class="fa-svg"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M272 304h-96C78.8 304 0 382.8 0 480c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32C448 382.8 369.2 304 272 304zM48.99 464C56.89 400.9 110.8 352 176 352h96c65.16 0 119.1 48.95 127 112H48.99zM224 256c70.69 0 128-57.31 128-128c0-70.69-57.31-128-128-128S96 57.31 96 128C96 198.7 153.3 256 224 256zM224 48c44.11 0 80 35.89 80 80c0 44.11-35.89 80-80 80S144 172.1 144 128C144 83.89 179.9 48 224 48z"/></svg></span></p>
44
<p><span class="fa-svg"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M448 48V384C385 407 366 416 329 416C266 416 242 384 179 384C159 384 143 388 128 392V328C143 324 159 320 179 320C242 320 266 352 329 352C349 352 364 349 384 343V135C364 141 349 144 329 144C266 144 242 112 179 112C128 112 104 133 64 141V448C64 466 50 480 32 480S0 466 0 448V64C0 46 14 32 32 32S64 46 64 64V77C104 69 128 48 179 48C242 48 266 80 329 80C366 80 385 71 448 48Z"/></svg></span></p>
55
<p><i class="fas fa-heart">Text prevents translation.</i></p>
6-
<p><i class="fa fa-does-not-exist"></i></p>
6+
<p><i class="fa fa-does-not-exist"></i></p>
7+
<p><i class="fa-solid fa-cat"></i></p>

tests/testsuite/rendering/fontawesome/src/fa.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@
99
<i class="fas fa-heart">Text prevents translation.</i>
1010

1111
<i class="fa fa-does-not-exist"></i>
12+
13+
<i class="fa-solid fa-cat"></i>

0 commit comments

Comments
 (0)