Skip to content

Comments

Run mdformat#2291

Closed
hukkin wants to merge 1 commit intoethereum:devfrom
hukkin:mdformat
Closed

Run mdformat#2291
hukkin wants to merge 1 commit intoethereum:devfrom
hukkin:mdformat

Conversation

@hukkin
Copy link

@hukkin hukkin commented Mar 30, 2021

This PR is continuation on the discussion in #2248, adding a Markdown formatter configuration to the repository and formatting all Markdown with it.

If this is considered to be merged, there's some configuration that should be tweaked according to this repo's preferences, for more detail read the downmost comments in #2248 (i.e. #2248 (comment) and #2248 (comment))

This PR currently includes a .pre-commit-config.yaml file which makes it as simple as pip install pre-commit && pre-commit install for a contributor to set up a git pre commit hook to automatically format before committing. It also acts as a configuration file for https://pre-commit.ci/ which is a CI that can be set up to automatically commit formatting fixes to PRs.

@hukkin hukkin mentioned this pull request Mar 30, 2021
Comment on lines +19 to +22
\- [Custody slashings](#custody-slashings)
\- [Custody key reveals](#custody-key-reveals)
\- [Early derived secret reveals](#early-derived-secret-reveals)
- [Construct attestation](#construct-attestation)
Copy link
Author

Choose a reason for hiding this comment

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

These changes are not a formatting error of the formatter. Instead, the ToC is broken (see the HTML rendering).

Copy link
Author

@hukkin hukkin Mar 30, 2021

Choose a reason for hiding this comment

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

This is a bug in DocToc that occurs when heading level increments by more than one. In this document there is a jump from ## Second level to ##### Fifth level heading that confuses DocToc. I could replace DocToc with mdformat-toc plugin to autogenerate ToCs, if desired. It doesn't suffer from this bug, and there would be one less tool to use.

@hukkin hukkin marked this pull request as draft March 30, 2021 22:18
@hukkin
Copy link
Author

hukkin commented Jun 28, 2021

Should I update or close this PR? @djrtwo

BTW, the Table of Contents in custody_game/validator.md is still broken.

@jtraglia
Copy link
Member

jtraglia commented Apr 3, 2025

Thanks @hukkin! mdformat is great. I have merged a new PR which adds this to our repo.

@jtraglia jtraglia closed this Apr 3, 2025
@hukkin hukkin deleted the mdformat branch April 3, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants