Skip to content

doc: all <pre> tags are highlighted as JavaScript #33363

Closed
@DerekNonGeneric

Description

@DerekNonGeneric

📗 API Reference Docs Problem

  • Version: n/a
  • Platform: n/a
  • Subsystem: n/a

Location

Section of the site where the content exists

Affected URL(s):

Problem description

Concise explanation of what you found to be problematic

While looking into #32938, I discovered that currently, every single <pre> tag gets highlighted as JavaScript regardless of the info string specified (and even if left unspecified). The following line executes the code that does this.

<script>highlight(undefined, undefined, 'pre');</script>

This behavior can be observed in the C++ code blocks in the published API reference documents. The following line is the reason for this — the language has been hard-coded.

sh_highlightElement(element, sh_languages["javascript"]);


  • I would like to work on this issue and submit a pull request.

^ I'm currently on summer vacation, so I would have the time to work on this.

/cc @Trott

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions