name: Bug Report
description: Create a report to help us improve
labels:
  - 'Status: Triage'
  - 'Type: Bug / Error'

body:
  - type: markdown
    attributes:
      value: |-
        ## Security vulnerabilities
        Please refer our [Security Policy](https://github.com/mermaid-js/.github/blob/main/SECURITY.md) and report to keep vulnerabilities confidential so we can release fixes first.

        ## Before you submit...
        We like to help you, but in order to do that should you make a few things first:

        - Use a clear and concise title
        - Fill out the text fields with as much detail as possible.
        - Never be shy to give us screenshots and/or code samples. It will help!

        There is a chance that the bug is already fixed in the git `develop` branch, but is not released yet. 
        So please check in [Live Editor - Develop](https://develop.git.mermaid.live) before raising an issue.
  - type: textarea
    attributes:
      label: Description
      description: Give a clear and concise description of what the bug is.
      placeholder: When I do ... does ... happen.
    validations:
      required: true
  - type: textarea
    attributes:
      label: Steps to reproduce
      description: Give a step-by-step example on how to reproduce the bug.
      placeholder: |-
        1. Do this
        2. Do that
        3. ...
        4. Bug!
    validations:
      required: true
  - type: textarea
    attributes:
      label: Screenshots
      description: If applicable, add screenshots to help explain your issue.
  - type: textarea
    attributes:
      label: Code Sample
      description: |-
        If applicable, add the code sample or a link to the [Live Editor - Develop](https://develop.git.mermaid.live).
        Any text pasted here will be rendered as a Code block.
      render: text
  - type: textarea
    attributes:
      label: Setup
      description: |-
        Please fill out the info below.
        Note that you only need to fill out the relevant section
      value: |-
        - Mermaid version:
        - Browser and Version: [Chrome, Edge, Firefox]
  - type: textarea
    attributes:
      label: Suggested Solutions
      description: >
        If applicable, suggest solutions that could resolve the bug.
        It would help maintainers/contributors to not waste time looking for the solution. Even pointing the line causing the bug would be great!
      placeholder: |-
        - Variable `parser` in file <filepath> is not initialised ...
        - Add a new type for ...
  - type: textarea
    attributes:
      label: Additional Context
      description: Anything else to add?
