readthedocs / readthedocs/ext-theme

Build details page: multi-line script don't render properly

Open
#146 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Improvement
Dominant language
HTML
Stars
12
Forks
6
Avg merge
13h 25m
Merged PRs (30d)
1

Description

We have this code in our YAML:

build:
  os: ubuntu-22.04
  tools:
    python: "3.10"
  jobs:
    post_checkout:
      # https://docs.readthedocs.io/en/stable/build-customization.html#cancel-build-based-on-a-condition
      #
      # Cancel building pull requests when there aren't changed in the docs directory.
      #
      # If there are no changes (git diff exits with 0) we force the command to return with 183.
      # This is a special exit code on Read the Docs that will cancel the build immediately.
      - |
        if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yml requirements/docs.txt;
        then
          echo "No changes to docs/ - exiting the build.";
          exit 183;
        fi

After merging https://github.com/readthedocs/readthedocs.org/pull/10119 it will render as a multi-line:

Screenshot_2023-03-07_16-56-16

However, in the new templates, it's shown as a one-line:

Screenshot_2023-03-07_16-58-32

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the old and new templates and trace how the build details page renders the YAML block containing the multi-line script. Done means the new templates preserve the script's line breaks and display it as a readable multi-line block rather than a single line.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.