Skip to content

Using <mark> tags in the <Highlight> element? #4

@Querela

Description

@Querela

Hi, thank you, this works really well. I still need to be a bit of tweaking for performance (maybe some debouncing on the filter input) but looks good so far.

While checking the highlighting, I found that it generates <span> tags. Is there any way or some easy way to be able to specify what HTML tag I can use in the react <Highlight/> element? I would like to use the <mark> element. In react-bootstrap there was an as= attribute but the logic might be a bit complicated to integrate here?

I know that I can probably do everything by specifying the classname / style if I just want to change the styling but I was thinking about the semantics of using the <mark> tag. Alternatively, I could probably also just duplicate the <Highlight/> component code a bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions