Skip to content

Seems there is a duplicate in test file #35

@talatkuyuk

Description

@talatkuyuk

Initial checklist

Affected package

rehype-highlight@latest

Steps to reproduce

I realized that there is a duplicate in the test file.
Both have the same name should reprocess exacthere and here

I would open a PR, but couldn't decide which one should be deleted; but then, realized also that the content in the first test is a little different. It doesn't produce the exact code:

  • <span class="hljs-built_in">console</span> becomes <span class="hljs-variable language_">console</span>
  • .log(<span class="hljs-string">"Hello, "</span> becomes .<span class="hljs-title function_">log</span>(<span class="hljs-string">"Hello, "</span>

I couldn't understand whether the first one is designed intentionally (since the input and output are not the same exact) or not, may be a bug causes that.

Another issue in the tests is the last test here. When I delete the settings , {languages: {...common, test: testLang}}, the result doesn't change. Registration of a language should cause a change as far as I understand from the name of the test.

Actual behavior

Actually it is not a bug, but maybe... explained in the previous section

Expected behavior

Actually it is not a bug, but maybe...explained in the previous section

Runtime

node@20

Package manager

npm@11

Operating system

macos

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions