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

resolve nested code fence line numbering #182

Merged
merged 7 commits into from
Nov 6, 2023

Conversation

johndutchover
Copy link
Contributor

@johndutchover johndutchover commented Oct 30, 2023

Summary of changes

index.md

Correct line numbering by adding by adding one backquote (min four) to code fences and indent code fences with three spaces

  1. Resolve rendering of pydantic/pydantic/docs/concepts/pydantic_settings.md:
pydantic-external-markdown
  1. Intent nested code fences using three spaces

    Fixes list items numbering: fenced code blocks, within item lists:
    pydantic-item-numbering

  2. Remove [renumbered] duplicate line:

pydantic-dup-line
  1. Remove newlines between code blocks and numbered list items to fix markdown number sequences.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e529615) 97.45% compared to head (4368c45) 97.45%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #182   +/-   ##
=======================================
  Coverage   97.45%   97.45%           
=======================================
  Files           5        5           
  Lines         314      314           
  Branches       69       69           
=======================================
  Hits          306      306           
  Misses          6        6           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johndutchover
Copy link
Contributor Author

For context, see pydantic/pydantic#7950

docs/index.md Outdated Show resolved Hide resolved
@hramezani
Copy link
Member

Thanks @johndutchover for this patch.

As I mentioned in the comments I don't see any change in the rendered docs.

You can also build pydantic-seetings docs locally. you need to:

  1. Clone and install pydantic project https://docs.pydantic.dev/latest/contributing/
  2. Change pydantic-settings doc link in pydantic_settings.md to use your branch. you can replace
    {{ external_markdown('https://raw.githubusercontent.com/pydantic/pydantic-settings/main/docs/index.md', '') }}
    with
    {{ external_markdown('https://raw.githubusercontent.com/johndutchover/pydantic-settings/pydantic-settings-docs/docs/index.md', '') }}

which is your branch.
3. Run make docs and see the rendered docs

@johndutchover

This comment was marked as resolved.

@johndutchover johndutchover marked this pull request as draft November 3, 2023 23:24
@johndutchover

This comment was marked as resolved.

@johndutchover
Copy link
Contributor Author

@hramezani Turns out that "extra" newlines between code blocks and the numbered list items was preventing desired numbering sequence (1. .... 2. ...) when building docs. LGTM now!

@johndutchover johndutchover marked this pull request as ready for review November 4, 2023 21:53
@hramezani hramezani merged commit b850ad1 into pydantic:main Nov 6, 2023
20 checks passed
@hramezani
Copy link
Member

Thanks @johndutchover

@johndutchover johndutchover deleted the pydantic-settings-docs branch November 6, 2023 13:49
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.

None yet

2 participants