name: Bug report
description: Report an error or unexpected behavior
labels: [bug]

body:
  - type: markdown
    attributes:
      value: |
        Welcome to the Quarto CLI GitHub repository!
        We are always happy to hear feedback from our users.

        This is the repository for the command-line program `quarto`:

        - If you're reporting an issue with the **Visual Editor** or with the **Visual Studio Code / Positron extension**, please visit https://github.com/quarto-dev/quarto
        - If you're reporting an issue inside **RStudio**, please visit https://github.com/rstudio/rstudio
        - If you're reporting an issue inside **Positron**, please visit https://github.com/posit-dev/positron/discussions
        - If you want to ask for a feature, please use the [Feature Requests GitHub Discussions](https://github.com/quarto-dev/quarto-cli/discussions/categories/feature-requests).
        - If you want to ask for help, please use the [Q&A GitHub Discussions](https://github.com/quarto-dev/quarto-cli/discussions/categories/q-a).

        Quarto is under active development!
        If convenient, we'd appreciate if you could check that the issue persists on the [latest pre-release](https://github.com/quarto-dev/quarto-cli/releases).

        Finally, so that we can get the most out of your bug report, consider reading our ["Bug Reports" guide](https://quarto.org/bug-reports.html).

        Thank you for using Quarto!

        ---

        You can share a Quarto document using the following syntax, _i.e._, using more backticks than you have in your document (usually four ` ```` `).
        For example with Quarto CLI >=1.5:

            ````qmd
            ---
            title: "Reproducible Quarto Document"
            format: html
            engine: jupyter
            ---
            
            This is a reproducible Quarto document using `format: html`.
            It is written in Markdown and contains embedded Python code.
            When you run the code, it will produce a message.
            
            ```{python}
            print("Hello, world!")
            ```
            
            ![An image]({{< placeholder 600 400 >}}){#fig-placeholder}
            
            {{< lipsum 1 >}}
            
            A reference to @fig-placeholder.
            
            The end.
            ````

  - type: checkboxes
    attributes:
      label: "I have:"
      options:
        - label: searched the issue tracker for similar issues
        - label: installed the latest version of [Quarto CLI](https://github.com/quarto-dev/quarto-cli/releases/latest)
        - label: formatted my issue following the [Bug Reports guide](https://quarto.org/bug-reports.html)

  - type: textarea
    attributes:
      label: Bug description
      description: Description of the bug.
      placeholder: Please describe the bug here.

  - type: textarea
    attributes:
      label: Steps to reproduce
      description: |
        Tell us how to reproduce this bug.  
        Please include a minimal, fully reproducible example as a self-contained Quarto document or a link to a Git repository.
      placeholder: |
        You can share a Quarto document using the following syntax, _i.e._, using more backticks than you have in your document (usually four ` ```` `).

        `````md
        ````qmd
        ---
        title: "Reproducible Quarto Document"
        format: html
        engine: jupyter
        ---

        This is a reproducible Quarto document using `format: html`.
        It is written in Markdown and contains embedded Python code.
        When you run the code, it will produce a message.

        ```{python}
        print("Hello, world!")
        ```

        ![An image]({{< placeholder 600 400 >}}){#fig-placeholder}

        {{< lipsum 1 >}}

        A reference to @fig-placeholder.

        The end.
        ````
        `````

  - type: textarea
    attributes:
      label: Actual behavior
      description: Tell us what happens instead.

  - type: textarea
    attributes:
      label: Expected behavior
      description: Tell us what should happen.

  - type: textarea
    attributes:
      label: Your environment
      description: |
        Please document the IDE (_e.g._ RStudio, VSCode, NVim), its version, and the operating system you're running (_e.g., MacOS Ventura 13.4, Windows 11, Linux Debian 11, _etc._).
      placeholder: |
        - IDE: RStudio 2023.03.1+446
        - OS: MacOS Ventura 13.4

  - type: textarea
    attributes:
      label: Quarto check output
      description: |
        Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
      placeholder: |
        ```bash
        quarto check
        ```
    validations:
      required: true

  - type: markdown
    attributes:
      value: "_Thanks for submitting this bug report!_"
