-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix Markdown rendering within summary/detail #2059
Conversation
This actually triggered two ERCs which have bad formatting:
|
I've fixed some of these "issues" locally, but actually realised that for some reason (probably due to |
Do you want to pursue this PR further? |
Yes. Need to figure out how I can convince my bundler to update the versions. |
013d9be
to
62c17a5
Compare
This brings in fixes to kramdown.
Hi! I'm a bot, and I wanted to automerge your PR, but couldn't because of the following issue(s):
|
# This is the default, but be explicit as some EIPs depend on it | ||
auto_ids: true | ||
# This is to ensure more determistic behaviour | ||
auto_id_stripping: true |
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.
Link generation is explained here: https://kramdown.gettalong.org/converter/html.html#auto-ids
Newer version of kramdown changed the rules, hence the changes to existing EIPs. The htmlproofer
check verifies that the links are pointing to existing headers.
@@ -36,6 +36,12 @@ twitter: | |||
# Build settings | |||
markdown: kramdown | |||
theme: minima | |||
kramdown: | |||
parse_block_html: false |
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.
Turned this to true
means that markdown parsing is enabled within <details>
blocks. However it is not working well. The closing HTML tags are not parsed.
This introduces problems with other EIPs which use the details
block properly (820, 1820, etc.): only with a larger code snippet and not with embedded markdown.
The resolution is to change EIP-1474 instead, which was the culprit triggering this entire PR.
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.
I can update EIP-1474 accordingly.
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.
@bitpshr thanks! I already did in this PR.
@Arachnid should be ready to merge. |
@@ -1397,8 +1393,6 @@ The `name` field defines which compiler was used in compilation. | |||
</table> | |||
|
|||
|
|||
<div id="version-version-1"></div> |
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.
Kramdown generates proper links out the headers now, no need for these. If left here htmlproofer complains about duplicate IDs. Manually verified they point to the right header.
@Arachnid any comments on merging this? |
@Arachnid @nicksavers any objections merging this? |
* Fix Markdown rendering within summary/detail * Add vendor to .gitignore * Remove duplicate github-pages entry from Gemfile * Require github-pages 198 This brings in fixes to kramdown. * Remove explicit jekyll version as github-pages brings it in as a dependency * Update bundler dependency tree * Fake bundler version * use Ruby 2.3.0 * Set sane defaults for kramdown * Fix links after kramdown update * Remove <details> formatting from EIP-1474 as it is not working with embedded markdown * Revert "Fix Markdown rendering within summary/detail" * Fix email in EIP-1812 * Remove <details> formatting from EIP-1620 as it is not working with embedded markdown
* Fix Markdown rendering within summary/detail * Add vendor to .gitignore * Remove duplicate github-pages entry from Gemfile * Require github-pages 198 This brings in fixes to kramdown. * Remove explicit jekyll version as github-pages brings it in as a dependency * Update bundler dependency tree * Fake bundler version * use Ruby 2.3.0 * Set sane defaults for kramdown * Fix links after kramdown update * Remove <details> formatting from EIP-1474 as it is not working with embedded markdown * Revert "Fix Markdown rendering within summary/detail" * Fix email in EIP-1812 * Remove <details> formatting from EIP-1620 as it is not working with embedded markdown
* Fix Markdown rendering within summary/detail * Add vendor to .gitignore * Remove duplicate github-pages entry from Gemfile * Require github-pages 198 This brings in fixes to kramdown. * Remove explicit jekyll version as github-pages brings it in as a dependency * Update bundler dependency tree * Fake bundler version * use Ruby 2.3.0 * Set sane defaults for kramdown * Fix links after kramdown update * Remove <details> formatting from EIP-1474 as it is not working with embedded markdown * Revert "Fix Markdown rendering within summary/detail" * Fix email in EIP-1812 * Remove <details> formatting from EIP-1620 as it is not working with embedded markdown
* Fix Markdown rendering within summary/detail * Add vendor to .gitignore * Remove duplicate github-pages entry from Gemfile * Require github-pages 198 This brings in fixes to kramdown. * Remove explicit jekyll version as github-pages brings it in as a dependency * Update bundler dependency tree * Fake bundler version * use Ruby 2.3.0 * Set sane defaults for kramdown * Fix links after kramdown update * Remove <details> formatting from EIP-1474 as it is not working with embedded markdown * Revert "Fix Markdown rendering within summary/detail" * Fix email in EIP-1812 * Remove <details> formatting from EIP-1620 as it is not working with embedded markdown
Tries to fix the rendering of https://eips.ethereum.org/EIPS/eip-1474
Idea from: gettalong/kramdown#155 (comment)
Fixes #1878.