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

Extraneous newlines in View Source for as_markdown #21

Open
jayqi opened this issue Feb 17, 2021 · 3 comments · May be fixed by #42
Open

Extraneous newlines in View Source for as_markdown #21

jayqi opened this issue Feb 17, 2021 · 3 comments · May be fixed by #42

Comments

@jayqi
Copy link

jayqi commented Feb 17, 2021

When I use pdocs as_markdown, it looks like there is a blank line added between every line of my source code inside the View Source sections, looking something like this:

??? example "View Source"
        from abc import ABC, abstractmethod

        from datetime import datetime

        from enum import Enum

        from pathlib import Path

        from typing import Callable, Dict, Optional

This also affected a site that I built via portray, and also seems to be affecting pdocs' own docs website, for example here: https://timothycrosley.github.io/pdocs/reference/pdocs/render/

The HTML version generated with pdocs as_html does not appear to have this problem.

  • pdocs 1.1.1
  • portray 1.5.2
@JesseWebDotCom
Copy link

JesseWebDotCom commented Mar 13, 2021

@jayqi - I'm using Portray and experience this as well. Were you able to find a workaround? Also, do you know how I can just hide source code in poetry until this is fixed? Thanks

@JesseWebDotCom
Copy link

This issue still occurs in Potray when the as_html flag, ex.: portray as_html --overwrite

@JesseWebDotCom
Copy link

JesseWebDotCom commented Mar 13, 2021

BTW - If you want to exclude source code in Portray until this issue is fixed, add this to your pyproject.toml:
[tool.portray.pdocs]
exclude_source = "true"

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 a pull request may close this issue.

2 participants