-
Notifications
You must be signed in to change notification settings - Fork 574
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
Allow HTML header anchor text to be HTML #1101
Conversation
@@ -44,10 +44,10 @@ | |||
|
|||
|
|||
def wrap_text(text, width=100): | |||
""" | |||
""" |
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.
All these whitespace fixes were auto-made by my editor, I can try to revert them if it's noise
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.
All good imo. I do the same when touching files.
build error is on the parallel notebooks job, which I don't think is related to this... |
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.
Test failure is a known issue in the python 2 kernel. Thanks for the change!
@@ -44,10 +44,10 @@ | |||
|
|||
|
|||
def wrap_text(text, width=100): | |||
""" | |||
""" |
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.
All good imo. I do the same when touching files.
In many projects it's common for anchor links to be icons (e.g., SVGs) or images embedded with something like FontAwesome. I've tried to get this working with nbconvert, but it supplying HTML for the anchor link text (e.g.
<i class='far fa-link'></i>
) gets sanitized into raw text instead of HTML.This PR does a quick check to see if the supplied anchor text is valid HTML and, if so, appends it to the link object with the assumption that it should be treated as HTML. This lets you do things like add fontawesome icons for anchor links.