-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent code from overflowing pre block #34
Conversation
@@ -31,7 +31,10 @@ class Vertex(object): | |||
self.neighbors[neighbor] = weight | |||
|
|||
def __str__(self): | |||
return '{} neighbors: {}'.format(self.key, [x.key for x in self.neighbors]) | |||
return '{} neighbors: {}'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this change actually affect spillover in those boxes? Or does this address character limits in a text editor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must have been spilling over... the character limits I'm only enforcing in .py files as that's where my linter runs 😄
A few things here:
|
font-family: Inconsolata, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; | ||
} | ||
|
||
pre { | ||
background: rgba(242, 242, 242, 0.5); | ||
padding: 20px; | ||
overflow-x: scroll; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned it in my general comment, but I think this rule created an extra line at the bottom of each pre box! Catastrophe!
Hmm, regarding the big monospaced font, this is what I see: That's both locally and on https://algos-book-pr-34.herokuapp.com/analysis/introduction/ Is the Inconsolata font loading for you? And you're definitely on this branch and did a hard refresh? |
Re the "extra line" that looks like an OSX scrollbar... I should have |
Double line issue should be fixed in 97be8f9. Can you take another quick look, and also check that Inconsolata is loading on your set up? Should be good to merge after that. |
Also re:
I think it's also better code 😄 . In general sticking to the 80-ish char guideline in Python tends to be a good idea. |
Double line issue seems to be fixed, but Inconsolata still doesn't seem to be loading. Git bisect pointed me to this commit. How else are we loading the Inconsolata font if not in that spot? Previous versions on this branch that look like your screenshots are defaulting to just monospace on my set up. 🔍 |
@aleksharma12 thanks! I've created #38 to track the font issue directly; will merge this in for now. |
Prevent code from overflowing pre block
Quick review anybody?
Fixes #29
Code is prevented form overflowing out of pre block, by a combination of using the more compact of the two monospace fonts more consistently; adding linebreaks; and,
overflow: scroll
.