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

html documentation does not show comments in code blocks #59088

Closed
alexgarel mannequin opened this issue May 22, 2012 · 2 comments
Closed

html documentation does not show comments in code blocks #59088

alexgarel mannequin opened this issue May 22, 2012 · 2 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@alexgarel
Copy link
Mannequin

alexgarel mannequin commented May 22, 2012

BPO 14883
Nosy @ezio-melotti
Superseder
  • bpo-12947: doctest directive examples in library/doctest.html lack the flags
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-05-22.14:18:23.317>
    created_at = <Date 2012-05-22.14:15:30.438>
    labels = ['type-bug', 'docs']
    title = 'html documentation does not show comments in code blocks'
    updated_at = <Date 2012-05-22.14:18:23.315>
    user = 'https://bugs.python.org/alexgarel'

    bugs.python.org fields:

    activity = <Date 2012-05-22.14:18:23.315>
    actor = 'ezio.melotti'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2012-05-22.14:18:23.317>
    closer = 'ezio.melotti'
    components = ['Documentation']
    creation = <Date 2012-05-22.14:15:30.438>
    creator = 'alexgarel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 14883
    keywords = []
    message_count = 2.0
    messages = ['161351', '161353']
    nosy_count = 3.0
    nosy_names = ['ezio.melotti', 'docs@python', 'alexgarel']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '12947'
    type = 'behavior'
    url = 'https://bugs.python.org/issue14883'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @alexgarel
    Copy link
    Mannequin Author

    alexgarel mannequin commented May 22, 2012

    Just under http://docs.python.org/library/doctest.html#doctest.REPORTING_FLAGS documentation speaks about how Doctest directives maybe expressed as special Python comments.

    There are some example along with the narrative story, however comments which here are the important part, are not displayed in code snippet.

    Looking at the sphinx source for this page : http://docs.python.org/_sources/library/doctest.txt the comments are present. Eg.

       >>> print range(20) #doctest: +NORMALIZE_WHITESPACE
       [0,   1,  2,  3,  4,  5,  6,  7,  8,  9,
       10,  11, 12, 13, 14, 15, 16, 17, 18, 19]

    However in the generated html, they are not:

    <span class="k">print</span> <span class="nb">range</span>
    <span class="p">(</span><span class="mi">20</span><span class="p">)</span>
    <span class="go">[0, 1, 2, 3, 4, 5, 6, 7, 8, 9,</span>

    Note that this issue is not present in python 2.6.8 documentation http://docs.python.org/release/2.6.8/library/doctest.html#doctest.REPORTING_FLAGS and also 3.1.5 is ok.

    It appears versions at 3.2.1 and 2.7.3

    @alexgarel alexgarel mannequin assigned docspython May 22, 2012
    @alexgarel alexgarel mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels May 22, 2012
    @ezio-melotti
    Copy link
    Member

    This is a duplicate of bpo-12947.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant