Draft
Conversation
aghArdeshir
commented
Oct 5, 2022
| // Find the span the aside should be anchored next to. | ||
| var name = aside.attr("name"); | ||
| var span = $("span[name='" + name + "']"); | ||
| var span = $("span[name='" + name.replace("'", "\\'") + "']"); |
Author
There was a problem hiding this comment.
There was a case in which the value of name was won't, and this whole selector would have become span[name='won't'], which is a syntax error. This change tries to prevent such cases.
aghArdeshir
commented
Oct 5, 2022
Comment on lines
+41
to
+43
| if (span.position()) { | ||
| aside.offset({top: span.position().top - 3}); | ||
| } |
Author
There was a problem hiding this comment.
There were cases where span.position() returned undefined. I didn't investigate it deeper, I just patched it this way, so it does not happen anymore.
Author
|
@munificent? You explicitly mentioned you won't be actively maintaining this repository anymore. But I thought of mentioning you, as I believe this PR is a must-have and helps in reading the book easier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi. This PR:
TODO:
asset/dark-styles.scssfile to use meaningful variables and better order of styles.ONLINE DEMO
https://aghardeshir.github.io/game-programming-patterns/html/command.html
VIDEO DEMO
dark-theme-for-game-programming-patterns.webm
VIDEO DEMO FOR READING THEME FROM SYSTEM SETTINGS
dark-theme-from-system.webm