Skip to content

Conversation

LXYan2333
Copy link

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

@perazz perazz requested a review from Copilot September 9, 2025 06:12
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses syntax highlighting and copy button functionality issues across multiple documentation files. The changes improve code block identification and user experience when copying code snippets.

Key changes:

  • Updates code block language identifiers from shell to console for command-line examples
  • Adds missing fortran language identifiers to code blocks
  • Configures copybutton extension to exclude command prompts and output from copied text

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
source/learn/quickstart/organising_code.md Adds fortran language identifier to code block
source/learn/quickstart/hello_world.md Changes shell to console for command-line examples
source/learn/quickstart/gotchas.md Adds fortran identifiers and changes shell to console
source/learn/building_programs/runtime_libraries.md Changes shell to console for ldd command output
source/learn/building_programs/managing_libraries.md Changes shell to console for compilation commands
source/learn/building_programs/linking_pieces.md Changes shell to console for gfortran commands
source/learn/building_programs/include_files.md Changes shell to console for compilation commands
source/learn/building_programs/distributing.md Changes shell to console for build script commands
source/learn/building_programs/compiling_source.md Changes shell to console for compiler commands
source/conf.py Adds copybutton configuration to exclude prompts from copied text

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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 this pull request may close these issues.

2 participants