<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=User_talk%3APaxed%2FMixedSyntaxHighlight</id>
	<title>User talk:Paxed/MixedSyntaxHighlight - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=User_talk%3APaxed%2FMixedSyntaxHighlight"/>
	<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;action=history"/>
	<updated>2026-06-03T22:16:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.5</generator>
	<entry>
		<id>https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61670&amp;oldid=prev</id>
		<title>Ilmari Karonen: don't see why it would</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61670&amp;oldid=prev"/>
		<updated>2010-12-19T10:51:58Z</updated>

		<summary type="html">&lt;p&gt;don&amp;#039;t see why it would&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:51, 19 December 2010&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-l5&quot; &gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;::Hmm, yeah, that's tricky... maybe you could make the regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]+)&amp;quot;&amp;gt;[ 0]*\1\.( *)(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; and do something like &amp;lt;code&amp;gt;$text .= substr($matches[2], 5 - strlen($matches[1])) . $matches[3] . &amp;quot;\n&amp;quot;;&amp;lt;/code&amp;gt;?  That should handle both left- and right-adjusted line numbers (and, coincidentally, should reject any lines where the number doesn't match the ID). --[[User:Ilmari Karonen|Ilmari Karonen]] 09:42, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;::Hmm, yeah, that's tricky... maybe you could make the regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]+)&amp;quot;&amp;gt;[ 0]*\1\.( *)(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; and do something like &amp;lt;code&amp;gt;$text .= substr($matches[2], 5 - strlen($matches[1])) . $matches[3] . &amp;quot;\n&amp;quot;;&amp;lt;/code&amp;gt;?  That should handle both left- and right-adjusted line numbers (and, coincidentally, should reject any lines where the number doesn't match the ID). --[[User:Ilmari Karonen|Ilmari Karonen]] 09:42, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;:::I'll look into it later today; hopefully this doesn't cause too much cpu usage increase... --[[User:Paxed|paxed]] 10:30, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;:::I'll look into it later today; hopefully this doesn't cause too much cpu usage increase... --[[User:Paxed|paxed]] 10:30, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;::::I don't see why it would.  (If you want to optimize the CPU usage, I'd suggest collecting the pieces of text in an array and doing a single join() to concatenate them at the end.)  --[[User:Ilmari Karonen|Ilmari Karonen]] 10:51, 19 December 2010 (UTC)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ilmari Karonen</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61669&amp;oldid=prev</id>
		<title>Paxed: /* Bug: regexp eats leading spaces */ i'll look into it later.</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61669&amp;oldid=prev"/>
		<updated>2010-12-19T10:30:38Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Bug: regexp eats leading spaces: &lt;/span&gt; i&amp;#039;ll look into it later.&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:30, 19 December 2010&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-l4&quot; &gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;:The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --[[User:Paxed|paxed]] 08:15, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;:The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --[[User:Paxed|paxed]] 08:15, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;::Hmm, yeah, that's tricky... maybe you could make the regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]+)&amp;quot;&amp;gt;[ 0]*\1\.( *)(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; and do something like &amp;lt;code&amp;gt;$text .= substr($matches[2], 5 - strlen($matches[1])) . $matches[3] . &amp;quot;\n&amp;quot;;&amp;lt;/code&amp;gt;?  That should handle both left- and right-adjusted line numbers (and, coincidentally, should reject any lines where the number doesn't match the ID). --[[User:Ilmari Karonen|Ilmari Karonen]] 09:42, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;::Hmm, yeah, that's tricky... maybe you could make the regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]+)&amp;quot;&amp;gt;[ 0]*\1\.( *)(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; and do something like &amp;lt;code&amp;gt;$text .= substr($matches[2], 5 - strlen($matches[1])) . $matches[3] . &amp;quot;\n&amp;quot;;&amp;lt;/code&amp;gt;?  That should handle both left- and right-adjusted line numbers (and, coincidentally, should reject any lines where the number doesn't match the ID). --[[User:Ilmari Karonen|Ilmari Karonen]] 09:42, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;:::I'll look into it later today; hopefully this doesn't cause too much cpu usage increase... --[[User:Paxed|paxed]] 10:30, 19 December 2010 (UTC)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Paxed</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61667&amp;oldid=prev</id>
		<title>Ilmari Karonen: /* Bug: regexp eats leading spaces */ suggest fix</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61667&amp;oldid=prev"/>
		<updated>2010-12-19T09:42:44Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Bug: regexp eats leading spaces: &lt;/span&gt; suggest fix&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 09:42, 19 December 2010&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-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;The regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]{1,4})&amp;quot;&amp;gt;[0-9]{1,4}\. *(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]].  Presumably, removing the first &amp;quot;*&amp;quot; (or replacing it with &amp;quot;?&amp;quot;) would fix the problem.  --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;The regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]{1,4})&amp;quot;&amp;gt;[0-9]{1,4}\. *(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]].  Presumably, removing the first &amp;quot;*&amp;quot; (or replacing it with &amp;quot;?&amp;quot;) would fix the problem.  --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;:The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --[[User:Paxed|paxed]] 08:15, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;:The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --[[User:Paxed|paxed]] 08:15, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;::Hmm, yeah, that's tricky... maybe you could make the regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]+)&amp;quot;&amp;gt;[ 0]*\1\.( *)(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; and do something like &amp;lt;code&amp;gt;$text .= substr($matches[2], 5 - strlen($matches[1])) . $matches[3] . &amp;quot;\n&amp;quot;;&amp;lt;/code&amp;gt;?  That should handle both left- and right-adjusted line numbers (and, coincidentally, should reject any lines where the number doesn't match the ID). --[[User:Ilmari Karonen|Ilmari Karonen]] 09:42, 19 December 2010 (UTC)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ilmari Karonen</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61664&amp;oldid=prev</id>
		<title>Paxed: /* Bug: regexp eats leading spaces */</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61664&amp;oldid=prev"/>
		<updated>2010-12-19T08:15:31Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Bug: regexp eats leading spaces&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&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: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:15, 19 December 2010&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-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;The regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]{1,4})&amp;quot;&amp;gt;[0-9]{1,4}\. *(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]].  Presumably, removing the first &amp;quot;*&amp;quot; (or replacing it with &amp;quot;?&amp;quot;) would fix the problem.  --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;The regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]{1,4})&amp;quot;&amp;gt;[0-9]{1,4}\. *(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]].  Presumably, removing the first &amp;quot;*&amp;quot; (or replacing it with &amp;quot;?&amp;quot;) would fix the problem.  --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;:The problem is that lines have the same number of characters for the line numbers... but lines with fewer numbers are padded with spaces. --[[User:Paxed|paxed]] 08:15, 19 December 2010 (UTC)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Paxed</name></author>
		
	</entry>
	<entry>
		<id>https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61660&amp;oldid=prev</id>
		<title>Ilmari Karonen: Bug: regexp eats leading spaces</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User_talk:Paxed/MixedSyntaxHighlight&amp;diff=61660&amp;oldid=prev"/>
		<updated>2010-12-19T07:10:00Z</updated>

		<summary type="html">&lt;p&gt;Bug: regexp eats leading spaces&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Bug: regexp eats leading spaces ==&lt;br /&gt;
&lt;br /&gt;
The regexp &amp;lt;code&amp;gt;/^ &amp;amp;lt;span id=\&amp;quot;line([0-9]{1,4})&amp;quot;&amp;gt;[0-9]{1,4}\. *(.*)&amp;amp;lt;\/span&amp;gt;$/&amp;lt;/code&amp;gt; causes indentation using spaces to disappear; see e.g. [[Source:Pray.c#dosacrifice]].  Presumably, removing the first &amp;quot;*&amp;quot; (or replacing it with &amp;quot;?&amp;quot;) would fix the problem.  --[[User:Ilmari Karonen|Ilmari Karonen]] 07:10, 19 December 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Ilmari Karonen</name></author>
		
	</entry>
</feed>