Skip to content

Wrong code in PrismJS website #2487

@sksar

Description

@sksar

On the PrismJS website, this page: https://prismjs.com/plugins/line-numbers/
has the code:

<body class="line-number"> <!-- enabled for the whole page -->
	<!-- with line numbers -->
	<pre><code>...</code></pre>
	<!-- disabled for a specific element - without line numbers -->
	<pre class="no-line-numbers"><code>...</code></pre>
	<div class="no-line-numbers"> <!-- disabled for this subtree -->
		<!-- without line numbers -->
		<pre><code>...</code></pre>
		<!-- enabled for a specific element - with line numbers -->
		<pre class="line-number"><code>...</code></pre>
	</div>
</body>

The part where it says <pre class="line-number"> I believe it's wrong because it did not work for me.
When I changed it to <pre class="line-numbers"> it did work.
So I think maybe the code on the website is wrong, or am I missing something here?

[PrismJs Version 1.20.0]

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