PrismJS / PrismJS/prism

Tag name does not highlight when array of objects of array of objects [{[{}]}] is passed as a prop

Open
#3,624 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13k
Forks
1.4k
Avg merge
15h 36m
Merged PRs (30d)
3

Description

Information:

  • Prism version: 1.29.0
  • Plugins: remark-gfm
  • Environment: Node

Description
When passing array of objects of array of objects [{[{}]}] as a prop to react component
We are using Material UI v5

Example
An example which reproduces the bug. This can be a link to a website, a JSFiddle, an attached example project, etc.

Code snippet to reproduce:

<ToolbarMenu
    label="Location"
    menuGroups={[
        {
            items: [
                { title: 'Location 1' },
                { title: 'Location 2' },
                { title: 'Location 3' },
            ],
        },
    ]}
/>

Screenshots:
Screenshot 2023-01-05 at 8 55 00 PM

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

Start by reproducing the behavior with the supplied ToolbarMenu JSX and nested menuGroups prop in the stated Prism 1.29.0 and Node environment; first confirm the issue is in Prism rather than the React component. Done means the tag name highlights for the shown nested array/object shape, with a regression check covering that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.