Skip to content
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

CIP-0054 | Fix API headers for markdown portability #591

Merged
merged 5 commits into from
Sep 17, 2023

Conversation

SmaugPool
Copy link
Contributor

@SmaugPool SmaugPool commented Sep 10, 2023

\< is supported by GitHub to escape HTML but not part of Markdown spec and not supported by showdown, breaking CIP-0054 rendering on https://cips.cardano.org/:
image

By escaping instead the opening angle bracket with &lt;, both GitHub and showdown rendering work correctly:
image

GitHub rendering:
https://github.com/SmaugPool/CIPs/tree/cip54-fix-rendering/CIP-0054

FYI: @kieransimkin

\< is supported by GitHub but not part of Markdown spec.
@SmaugPool SmaugPool changed the title CIP-0054: Fix showdown rendering by escaping HTML with &lt; CIP-0054 Fix showdown rendering by escaping HTML with &lt; Sep 10, 2023
@SmaugPool SmaugPool changed the title CIP-0054 Fix showdown rendering by escaping HTML with &lt; CIP-0054 | Fix showdown rendering by escaping HTML with &lt; Sep 10, 2023
@Ryun1 Ryun1 added the Correction Fixing minor issue or typo label Sep 10, 2023
Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SmaugPool can you anticipate any problems with Showdown rendering if these API headers were more properly typeset as code? https://gist.github.com/rphair/d206e385ef694396841f765a6dd27696

CIP-0054/README.md Outdated Show resolved Hide resolved
CIP-0054/README.md Outdated Show resolved Hide resolved
CIP-0054/README.md Outdated Show resolved Hide resolved
@rphair rphair changed the title CIP-0054 | Fix showdown rendering by escaping HTML with &lt; CIP-0054 | Fix API headers for markdown portability Sep 10, 2023
@rphair
Copy link
Collaborator

rphair commented Sep 10, 2023

p.s. @SmaugPool @Ryun1 this is also an issue for CIP-0030 (I just checked all merged CIP README's [grep '^#' CIPs/*/README.md] and only found this additional one with code in the headers) so I'm going to commit #591 (review) so we can test it a bit more on the smaller & less popular CIP before maybe updating the CIP-0030 API headers also in this PR.

@SmaugPool
Copy link
Contributor Author

@SmaugPool can you anticipate any problems with Showdown rendering if these API headers were more properly typeset as code? https://gist.github.com/rphair/d206e385ef694396841f765a6dd27696

Inline code in the headers also solves the issue but it's displayed differently, and I didn't want to change the author formatting intention. I guess it's also an acceptable solution though if preferred.

@rphair
Copy link
Collaborator

rphair commented Sep 11, 2023

OK @SmaugPool @Ryun1 let's put this through then (unless @kieransimkin has any objections) and after it's agreed upon I'll submit a PR to update CIP-0030 the same way... this may require some care because of potential merge conflicts with pending CIP-0030 updates, so I think we should keep the 2 sets of changes separate.

@rphair rphair merged commit cffc990 into cardano-foundation:master Sep 17, 2023
Ryun1 pushed a commit to Ryun1/CIPs that referenced this pull request Nov 17, 2023
…on#591)

* CIP-0054 | Fix showdown rendering by escaping HTML with &lt;

\< is supported by GitHub but not part of Markdown spec.

* change header to use code markdown: 1 of 5

* change header to use code markdown: 2 of 5

* change header to use code markdown: 3 of 5

* change header to use code markdown: 4+5 of 5

---------

Co-authored-by: Robert Phair <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Correction Fixing minor issue or typo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants