Revision 305e60034740f8e20221b6e00830ee0814102bd6 authored by Quentin Monnet on 07 May 2021, 10:41:24 UTC, committed by André Martins on 16 June 2021, 00:03:28 UTC
[ upstream commit 869e678b1ae3461b169259155e3bb52b6b4fa072 ]

Add a "Copy Commands" to some code blocks. This new button attempts to
copy only commands (and not their output) to the clipboard. The
distinction between commands and output relies on the presence of a
prompt symbol, either "$" or "#", at the beginning of the commands. If a
command ends with a trailing backslash, copy the next line as well.

For example, the following snippet:

    .. code-block:: shell-session

        $ ls -l
        foo
        cat
        $ echo 1 \
        2 \
                3\
            4
        $nospace
        # exit

should place the following text into the clipboard:

    ls -l
    echo 1
    2
            3
        4
    exit

The button is added for the following blocks, when they contain several
lines and at least one command is found in the block:

- "code-block", but with language "shell-session" only,
- Literal blocks ("::"),
- Parsed literals.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1 parent c7c92f2
Raw File
.mailmap
Alexei Starovoitov <alexei.starovoitov@gmail.com>
André Martins <andre@cilium.io>
Andrew Sy Kim <kim.andrewsy@gmail.com>
Anthony Rabbito <hello@anthonyrabbito.com>
Arika Chen <eaglesora@gmail.com>
Arthur Chiao <arthurchiao@hotmail.com>
Arthur Evstifeev <aevstifeev@gitlab.com>
Arthur Evstifeev <mail@ap4y.me>
Arvind Soni <arvind@covalent.io>
Ashwin Paranjpe <ashwin@covalent.io>
Ashwin Paranjpe <ashwinp.work@gmail.com>
Bingwu Yang <detailyang@gmail.com>
Bob Bouteillier <bob.bouteillier@datadoghq.com>
Changyu Wang <changyuwang@tencent.com>
Charles-Henri Guérin <charles-henri.guerin@zenika.com>
Christine Chen <christine.chen@datadoghq.com>
Christopher Biscardi <chris@christopherbiscardi.com>
Craig Box <craig.box@gmail.com>
Dan Wendlandt <dan@isovalent.com>
Daniel Qian <qsj.daniel@gmail.com>
Darren Mackintosh <unixdaddy@gmail.com>
Darshan Chaudhary <deathbullet@gmail.com>
Dawn <lx1960753013@gmail.com>
Devarshi Sathiya <devarshisathiya5@gmail.com>
El-Fadel Bonfoh <elfadel@accuknox.com> <bonfohelfadel@gmail.com>
Fankaixi Li <fankaixi.li@bytedance.com>
Florian Koch <f0@users.noreply.github.com>
François Joulaud <francois.joulaud@radiofrance.com> <48206448+joulaud@users.noreply.github.com>
Gaurav Genani <h3llix.pvt@gmail.com>
Gaurav Yadav <gaurav.dev.iiitm@gmail.com>
George Kontridze <gkontridze@plaid.com>
Gowtham Sundara <gowtham.sundara@rapyuta-robotics.com>
huangxuesen <huangxuesen@kuaishou.com>
Hui Kong <hui.kong@qunar.com> <konghui@live.cn>
Ian Vernon <ian@cilium.io> <vagrant@k8s1>
Ifeanyi Ubah <ify1992@yahoo.com>
Jarno Rajahalme <jarno@isovalent.com>
Jarno Rajahalme <jarno@covalent.io>
Jed Salazar <jed@isovalent.com>
Jerry J. Muzsik <jerrymuzsik@icloud.com>
Jomen Xiao <jomenxiao@gmail.com>
Jonathan Davies <jpds@protonmail.com>
Joshua Roppo <joshroppo@gmail.com>
Jun Chen <answer1991.chen@gmail.com>
Junli Ou <oujunli306@gmail.com>
Kaito Ii <kaitoii1111@gmail.com>
Karl Heins <karlheins@northwesternmutual.com>
Bokang Li <libokang.dev@gmail.com>
Lior Rozen <liorr@tailorbrands.com> <liorrozen@users.noreply.github.com>
Liu Qun <qunliu@zyhx-group.com>
Livingstone S E <livingstone.s.e@gmail.com>
Madhu Challa <challa@gmail.com>
Mahadev Panchal <mahadev.panchal@accuknox.com>
Mandar U Jog <mjog@google.com> <mandarjog@gmail.com>
Marc Stulz <m@footek.ch>
Matthew Gumport <me@gum.pt>
Michael Kashin <mmkashin@gmail.com>
Michael Vorburger <vorburger@redhat.com>
Neela Jacques <neela@isovalent.com> <68304471+Neelajacques@users.noreply.github.com>
Peiqi Shi <uestc.shi@gmail.com>
Philippe Lafoucrière <philippe.lafoucriere@gmail.com>
Pierre-Yves Aillet <pyaillet@gmail.com> <pyaillet@users.noreply.github.com>
Raphael Campos <raphael@accuknox.com>
Rei Shimizu <Shikugawa@gmail.com>
Roman Ptitcyn <romanspb@yahoo.com>
Salvatore Mazzarino <salvatore@accuknox.com> <dev@mazzarino.cz>
Sami Yessou <fnzv@users.noreply.github.com>
Sander Timmerman <stimmerman@schubergphilis.com>
Sean Winn <sean@isovalent.com> <seanmwinn@hotmail.com>
Sergey Generalov <sergey@isovalent.com> <sergey@genbit.ru>
Tam Mach <sayboras@yahoo.com>
Thomas Graf <thomas@cilium.io>
Tomoki Sugiura <cheztomo513@gmail.com>
Tony Lu <tonylu@linux.alibaba.com>
Trevor Tao <trevor.tao@arm.com>
Vance Li <liyannois@gmail.com>
Vlad Ungureanu <vladu@palantir.com> <ungureanuvladvictor@gmail.com>
Wayne Haber <whaber@gitlab.com> <41373231+whaber@users.noreply.github.com>
Weilong Cui <cuiwl@google.com>
Yiannis Yiakoumis <yiannis@selfienetworks.com>
Youssef Azrak <yazrak.tech@gmail.com>
Yurii Dzobak <yurii.dzobak@lotusflare.com>
Yurii Komar <Subreptivus@gmail.com>
Yves Blusseau <yves.blusseau@acoss.fr>
Zhu Yan <hackzhuyan@gmail.com>
back to top