<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.discord.digital/index.php?action=history&amp;feed=atom&amp;title=Using_code_highlighting_with_MediaWiki_pages</id>
	<title>Using code highlighting with MediaWiki pages - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.discord.digital/index.php?action=history&amp;feed=atom&amp;title=Using_code_highlighting_with_MediaWiki_pages"/>
	<link rel="alternate" type="text/html" href="https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;action=history"/>
	<updated>2026-06-07T02:41:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;diff=35&amp;oldid=prev</id>
		<title>Discorddigital at 23:11, 27 February 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;diff=35&amp;oldid=prev"/>
		<updated>2021-02-27T23:11:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:11, 27 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Prologue ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Prologue ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We&amp;#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We&amp;#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;This guide will show you how to use it and how to find the names for the languages, so SyntaxHighlight knows what it&amp;#039;s highlighting.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;This guide will show you how to use it and how to find the names for the languages, so SyntaxHighlight knows what it&amp;#039;s highlighting.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key discorddigital_mediawiki_1:diff::1.12:old-34:rev-35 --&gt;
&lt;/table&gt;</summary>
		<author><name>Discorddigital</name></author>
	</entry>
	<entry>
		<id>https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;diff=34&amp;oldid=prev</id>
		<title>Discorddigital at 22:12, 27 February 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;diff=34&amp;oldid=prev"/>
		<updated>2021-02-27T22:12:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:12, 27 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Prologue ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Prologue ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We&amp;#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We&amp;#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;This guide will show you how to use it and how to find the names for the languages, so SyntaxHighlight knows what it&amp;#039;s highlighting.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This guide will show you how to use it and how to find the names for the languages, so SyntaxHighlight knows what it&amp;#039;s highlighting.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== HTML Syntax ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== HTML Syntax ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key discorddigital_mediawiki_1:diff::1.12:old-30:rev-34 --&gt;
&lt;/table&gt;</summary>
		<author><name>Discorddigital</name></author>
	</entry>
	<entry>
		<id>https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;diff=30&amp;oldid=prev</id>
		<title>Discorddigital: Created page with &quot;=== Prologue === We&#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]  This guide will show you how to use it and how to...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.discord.digital/index.php?title=Using_code_highlighting_with_MediaWiki_pages&amp;diff=30&amp;oldid=prev"/>
		<updated>2021-02-27T22:06:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Prologue === We&amp;#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]  This guide will show you how to use it and how to...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Prologue ===&lt;br /&gt;
We&amp;#039;re using an extension called [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight]&lt;br /&gt;
&lt;br /&gt;
This guide will show you how to use it and how to find the names for the languages, so SyntaxHighlight knows what it&amp;#039;s highlighting.&lt;br /&gt;
&lt;br /&gt;
== HTML Syntax ==&lt;br /&gt;
===== Without line numbers =====&lt;br /&gt;
This one is useful if you expect the reader to copy the code.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apacheconf&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
RewriteRule ^(.*)$ index.php?title=$1 [NC,L,QSA]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== With line numbers =====&lt;br /&gt;
This one can be useful if you want to refer to a line of code.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apacheconf&amp;quot; line&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
RewriteRule ^(.*)$ index.php?title=$1 [NC,L,QSA]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can also specify on which line to start counting.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apacheconf&amp;quot; line start=&amp;quot;55&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
RewriteRule ^(.*)$ index.php?title=$1 [NC,L,QSA]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Finding language names ==&lt;br /&gt;
You can do so by going to this page: https://pygments.org/docs/lexers/&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;ll want to search on the page for the language you want to highlight.&lt;br /&gt;
Then look for the &amp;quot;Short names&amp;quot; and pick one.&lt;br /&gt;
&lt;br /&gt;
Insert the short name in the &amp;quot;lang&amp;quot; parameter and the text inside the &amp;lt;syntaxhighlight&amp;gt; block will be highlighted accordingly.&lt;br /&gt;
&lt;br /&gt;
[[Category:MediaWiki]]&lt;/div&gt;</summary>
		<author><name>Discorddigital</name></author>
	</entry>
</feed>