<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Updated Vpatch: Code Embed Plugin for MP-WP</title>
	<atom:link href="http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/</link>
	<description></description>
	<pubDate>Fri, 03 Apr 2026 19:21:02 +0000</pubDate>
	<generator>http://polimedia.us</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: #ossasepia Logs for Jun 2020 &#171; Ossa Sepia</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-163</link>
		<dc:creator>#ossasepia Logs for Jun 2020 &#171; Ossa Sepia</dc:creator>
		<pubDate>Fri, 26 Jun 2020 13:34:58 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-163</guid>
		<description>[...] . The characters in http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/ didn&apos;t work. Consequently the codeblock in my [...]</description>
		<content:encoded><![CDATA[<p>[...] . The characters in <a href="http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/" rel="nofollow">http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/</a> didn&apos;t work. Consequently the codeblock in my [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Updated vpatch: Add embeddable codeblocks and the server-side select mechanism &#171; billymg</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-144</link>
		<dc:creator>Updated vpatch: Add embeddable codeblocks and the server-side select mechanism &#171; billymg</dc:creator>
		<pubDate>Mon, 18 May 2020 12:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-144</guid>
		<description>[...] below for the updated embeddable codeblocks patch. This is the third iteration after the first two discussions. This patch also now contains the server-side select mechanism, including the updates [...]</description>
		<content:encoded><![CDATA[<p>[...] below for the updated embeddable codeblocks patch. This is the third iteration after the first two discussions. This patch also now contains the server-side select mechanism, including the updates [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billymg</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-118</link>
		<dc:creator>billymg</dc:creator>
		<pubDate>Wed, 08 Apr 2020 00:17:25 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-118</guid>
		<description>&#62; Why not un-indirect the MP_WP_CODEBLOCK_OPEN which isn't meaningfully customizable anyway, and shrink the first set of parens to include just the number (as I showed)? Then no need for substr and you get multi-digits for free.

That's a good point, i'll update the patch accordingly. And per our other thread on your article i'll ping others in #o about what options people would like to see customizable.</description>
		<content:encoded><![CDATA[<p>&gt; Why not un-indirect the MP_WP_CODEBLOCK_OPEN which isn't meaningfully customizable anyway, and shrink the first set of parens to include just the number (as I showed)? Then no need for substr and you get multi-digits for free.</p>
<p>That's a good point, i'll update the patch accordingly. And per our other thread on your article i'll ping others in #o about what options people would like to see customizable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Welsh</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-117</link>
		<dc:creator>Jacob Welsh</dc:creator>
		<pubDate>Tue, 07 Apr 2020 22:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-117</guid>
		<description>&#62; I think adding support for eight more languages will take quite some time.

Seems more likely that someone would do a whole bunch at once rather than a trickle, and also to be encouraged to reduce churn and chance of conflicts in the "address space" (hey, it wasn't my idea to use numbers instead of language names).

I think the regexing is easier than you've made it on yourself. Why not un-indirect the MP_WP_CODEBLOCK_OPEN which isn't meaningfully customizable anyway, and shrink the first set of parens to include just the number (as I showed)? Then no need for substr and you get multi-digits for free.</description>
		<content:encoded><![CDATA[<p>&gt; I think adding support for eight more languages will take quite some time.</p>
<p>Seems more likely that someone would do a whole bunch at once rather than a trickle, and also to be encouraged to reduce churn and chance of conflicts in the "address space" (hey, it wasn't my idea to use numbers instead of language names).</p>
<p>I think the regexing is easier than you've made it on yourself. Why not un-indirect the MP_WP_CODEBLOCK_OPEN which isn't meaningfully customizable anyway, and shrink the first set of parens to include just the number (as I showed)? Then no need for substr and you get multi-digits for free.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: billymg</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-116</link>
		<dc:creator>billymg</dc:creator>
		<pubDate>Tue, 07 Apr 2020 17:41:55 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-116</guid>
		<description>&gt; Do you mean for this to allow only one digit? You could use \[([0-9]+)\[ so the parens capture the number portion (then there's surely a preg function to get at it).

I meant for it to only be 0-9 as I think adding support for eight more languages will take quite some time. I'm grabbing the matched index from the array that &lt;code&gt;preg_match_all&lt;/code&gt; populates (&lt;a href="http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/#S1-L37" rel="nofollow"&gt;#S1-L37&lt;/a&gt;), which currently depends on it being a single-digit number (though it could be updated to grab any length between &lt;code&gt;[[&lt;/code&gt;).

&gt; This nonetheless comes at the cost of having to fork the v-tree. It occurred to me this one might warrant a global setting in wp-config.php, since it really seems to be a matter of taste/theme.

I could see that, perhaps the entire options can be set in wp-config.php? See also my &lt;a href="http://fixpoint.welshcomputing.com/2020/selection-and-other-sundries-for-mp-wp/#comment-235" rel="nofollow"&gt;comment&lt;/a&gt; on your recent article.

&gt; So my current filter is: [...]

This is a nice simplification, thanks!

&gt; I don't quite follow, but how does this handle multiple sequential spaces [...] ?

e.g. previously with the &lt;code&gt;pre&lt;/code&gt; tag wrapped around the &lt;code&gt;table&lt;/code&gt;, copying:
&lt;pre&gt;
line1
line2
&lt;/pre&gt;
and pasting it would yield:
&lt;pre&gt;
line1


line2
&lt;/pre&gt;

Multiple sequential spaces are handled as you would want/expect them to be (i.e. maintained). The &lt;code&gt;pre&lt;/code&gt; tag was superfluous because of &lt;code&gt;td.content-column { white-space: pre-wrap; }&lt;/code&gt; in the CSS.</description>
		<content:encoded><![CDATA[<p>> Do you mean for this to allow only one digit? You could use \[([0-9]+)\[ so the parens capture the number portion (then there's surely a preg function to get at it).</p>
<p>I meant for it to only be 0-9 as I think adding support for eight more languages will take quite some time. I'm grabbing the matched index from the array that <code>preg_match_all</code> populates (<a href="http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/#S1-L37" rel="nofollow">#S1-L37</a>), which currently depends on it being a single-digit number (though it could be updated to grab any length between <code>[[</code>).</p>
<p>> This nonetheless comes at the cost of having to fork the v-tree. It occurred to me this one might warrant a global setting in wp-config.php, since it really seems to be a matter of taste/theme.</p>
<p>I could see that, perhaps the entire options can be set in wp-config.php? See also my <a href="http://fixpoint.welshcomputing.com/2020/selection-and-other-sundries-for-mp-wp/#comment-235" rel="nofollow">comment</a> on your recent article.</p>
<p>> So my current filter is: [...]</p>
<p>This is a nice simplification, thanks!</p>
<p>> I don't quite follow, but how does this handle multiple sequential spaces [...] ?</p>
<p>e.g. previously with the <code>pre</code> tag wrapped around the <code>table</code>, copying:</p>
<pre>
line1
line2
</pre>
<p>and pasting it would yield:</p>
<pre>
line1

line2
</pre>
<p>Multiple sequential spaces are handled as you would want/expect them to be (i.e. maintained). The <code>pre</code> tag was superfluous because of <code>td.content-column { white-space: pre-wrap; }</code> in the CSS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Welsh</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-115</link>
		<dc:creator>Jacob Welsh</dc:creator>
		<pubDate>Tue, 07 Apr 2020 01:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-115</guid>
		<description>Looking good!

&#62; i. This is now a regex pattern to include an encoded syntax index.

Do you mean for this to allow only one digit? You could use \[([0-9]+)\[ so the parens capture the number portion (then there's surely a preg function to get at it).

&#62; ii. ... Feel free to set it how you like using this variable.

This nonetheless comes at the cost of having to fork the v-tree. It occurred to me this one might warrant a global setting in wp-config.php, since it really seems to be a matter of taste/theme.

&#62; v. ... This was all I needed for this article:

The closing characters don't generally need escaping, since they have special meaning only after the corresponding opening one (and footnotes-within-footnotes wouldn't work anyway AFAIK). Single/double quotes only need it in the context of an attribute (i.e. &#60;a href="evil-user-input-here"&#62;). So my current filter is:

&lt;blockquote&gt;sed 's/&#38;/\&#38;amp;/g; s/&#60;/\&#38;lt;/g; s/(&lpar;/(\&#38;lpar;/g'&lt;/blockquote&gt;

&#62; vi. I changed this to a plain div because the pre tag wrapped around the other markup (which is probably a misuse of the pre tag in any case) would cause extra newlines to be added when copy/pasting from the snippet into a text file.

I don't quite follow, but how does this handle multiple sequential spaces (as might be significant e.g. in a regexp even if one fully adopts MP's space-indent ban)?

&#62; vii. This little bit of CSS avoids selecting footnote markers and line numbers when copy/pasting text from a codeblock. Go ahead, try it out.

That's very shiny!</description>
		<content:encoded><![CDATA[<p>Looking good!</p>
<p>&gt; i. This is now a regex pattern to include an encoded syntax index.</p>
<p>Do you mean for this to allow only one digit? You could use \[([0-9]+)\[ so the parens capture the number portion (then there's surely a preg function to get at it).</p>
<p>&gt; ii. ... Feel free to set it how you like using this variable.</p>
<p>This nonetheless comes at the cost of having to fork the v-tree. It occurred to me this one might warrant a global setting in wp-config.php, since it really seems to be a matter of taste/theme.</p>
<p>&gt; v. ... This was all I needed for this article:</p>
<p>The closing characters don't generally need escaping, since they have special meaning only after the corresponding opening one (and footnotes-within-footnotes wouldn't work anyway AFAIK). Single/double quotes only need it in the context of an attribute (i.e. &lt;a href="evil-user-input-here"&gt;). So my current filter is:</p>
<blockquote><p>sed 's/&amp;/\&amp;amp;/g; s/&lt;/\&amp;lt;/g; s/(&lpar;/(\&amp;lpar;/g'</p></blockquote>
<p>&gt; vi. I changed this to a plain div because the pre tag wrapped around the other markup (which is probably a misuse of the pre tag in any case) would cause extra newlines to be added when copy/pasting from the snippet into a text file.</p>
<p>I don't quite follow, but how does this handle multiple sequential spaces (as might be significant e.g. in a regexp even if one fully adopts MP's space-indent ban)?</p>
<p>&gt; vii. This little bit of CSS avoids selecting footnote markers and line numbers when copy/pasting text from a codeblock. Go ahead, try it out.</p>
<p>That's very shiny!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diana Coman</title>
		<link>http://billymg.com/2020/04/updated-patch-code-embed-plugin-for-mp-wp/comment-page-1/#comment-113</link>
		<dc:creator>Diana Coman</dc:creator>
		<pubDate>Sat, 04 Apr 2020 20:21:54 +0000</pubDate>
		<guid isPermaLink="false">http://billymg.com/?p=61#comment-113</guid>
		<description>Looks quite good! I'll add it to the list to give it a spin sooner rather than later.</description>
		<content:encoded><![CDATA[<p>Looks quite good! I'll add it to the list to give it a spin sooner rather than later.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
