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

[docs] Copy code button misses '...' prefixed code #6518

Merged
merged 1 commit into from
Aug 20, 2020

Commits on Aug 16, 2020

  1. Docs copy button misses ... prefixed code

    Tested in a local build of the docs.
    
    e.g. Just above https://huggingface.co/transformers/task_summary.html#causal-language-modeling
    
    Copy will copy the full code, e.g.
    
    for token in top_5_tokens:
         print(sequence.replace(tokenizer.mask_token, tokenizer.decode([token])))
    
    Instead of currently only:
    
    for token in top_5_tokens:
    
    
    >>> for token in top_5_tokens:
    ...     print(sequence.replace(tokenizer.mask_token, tokenizer.decode([token])))
    Distilled models are smaller than the models they mimic. Using them instead of the large versions would help reduce our carbon footprint.
    Distilled models are smaller than the models they mimic. Using them instead of the large versions would help increase our carbon footprint.
    Distilled models are smaller than the models they mimic. Using them instead of the large versions would help decrease our carbon footprint.
    Distilled models are smaller than the models they mimic. Using them instead of the large versions would help offset our carbon footprint.
    Distilled models are smaller than the models they mimic. Using them instead of the large versions would help improve our carbon footprint.
    
    Docs for the option fix:
    https://sphinx-copybutton.readthedocs.io/en/latest/
    romainr committed Aug 16, 2020
    Configuration menu
    Copy the full SHA
    5eae220 View commit details
    Browse the repository at this point in the history