webpage icon indicating copy to clipboard operation
webpage copied to clipboard

fix highlight and copybutton related issue

Open LXYan2333 opened this issue 1 year ago • 0 comments

There is a lot of highlight issue in the original webpage:

  1. several code block missing ```fortran identifier

  2. some console block is identified as shell, which is used for shell script file highlight (ref: https://github.com/github-linguist/linguist/blob/466ed9937ffe5609ab565f43d7305a5d46410622/lib/linguist/languages.yml#L6738)

    this does not only affect the highlight, but also confused the copybutton sphinx extension. for example:

    ```shell
    $ echo 1
    \ ```
    

    in this case, copybutton will copy $ echo 1, but if this block is identified as console then echo 1 will be copied.

  3. there is one line added in conf.py, which is used to strip command output from the copied text. the related document can be found on here

LXYan2333 avatar Nov 27 '24 10:11 LXYan2333