ipsumgenera icon indicating copy to clipboard operation
ipsumgenera copied to clipboard

Extraneous extra encoding using Nimrod 0.9.6

Open gradha opened this issue 11 years ago • 2 comments

When ipsumgenera is installed with 0.9.6 the output it produces generates an extra amount of encoded characters. Here is a diff extract:

…
 <p>One strange feature of git is that after a remote branch has been deleted, y
 $ git fetch upstream
 remote: Counting objects: 8, done.
 remote: Total 6 (delta 1), reused 6 (delta 1)
-Unpacking objects: 100% (6/6), done.
-From github.com:remoteuser/healthyspam
- * [new branch]      develop    -&gt; upstream/develop
- * [new branch]      stable     -&gt; upstream/stable
+Unpacking objects: 100% (6&#x2F;6), done.
+From github.com:remoteuser&#x2F;healthyspam
+ * [new branch]      develop    -&gt; upstream&#x2F;develop
+ * [new branch]      stable     -&gt; upstream&#x2F;stable
 $ git branch -va
 * master                   a8e1d54 Initial commit
-  remotes/origin/HEAD      -&gt; origin/master
-  remotes/origin/master    a8e1d54 Initial commit
-  remotes/upstream/develop 280e777 Develop
-  remotes/upstream/master  a8e1d54 Initial commit
-  remotes/upstream/stable  8cdc31d Stable</pre></p>
-<p>You only need to <a href="http://stackoverflow.com/a/1072178/172690">run a c
+  remotes&#x2F;origin&#x2F;HEAD      -&gt; origin&#x2F;master
+  remotes&#x2F;origin&#x2F;master    a8e1d54 Initial commit
+  remotes&#x2F;upstream&#x2F;develop 280e777 Develop
+  remotes&#x2F;upstream&#x2F;master  a8e1d54 Initial commit
+  remotes&#x2F;upstream&#x2F;stable  8cdc31d Stable</pre></p>
+<p>You only need to <a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;107
 $ git remote prune upstream
 Pruning upstream
…

Even URLs are escaped:

@@ -14,15 +14,15 @@
                                href="../../../feed.xml"><img
                        alt="rss feed" src="../../../i/Feed-icon.svg"
                        width="18pt" height="18pt"></a></h3>
-               <h1>Invoking Dash from the command line Vim</h1><p><a href="http
-<p>My editor of choice is <a href="http://www.vim.org">Vim</a> as invoked from 
+               <h1>Invoking Dash from the command line Vim</h1><p><a href="http
+<p>My editor of choice is <a href="http:&#x2F;&#x2F;www.vim.org">Vim</a> as inv
 <pre class='literal'>&quot; Dash integration for objc and nimrod.
-command! DashNim silent !open -g dash://nimrod:&quot;&lt;cword&gt;&quot;
-command! DashDef silent !open -g dash://def:&quot;&lt;cword&gt;&quot;
+command! DashNim silent !open -g dash:&#x2F;&#x2F;nimrod:&quot;&lt;cword&gt;&qu
+command! DashDef silent !open -g dash:&#x2F;&#x2F;def:&quot;&lt;cword&gt;&quot;
 nmap K :DashDef&lt;CR&gt;\|:redraw!&lt;CR&gt;
…

Validators accept the generated output, but it would be valid too even if every single byte was encoded. Is this encoding necessary? This can be reproduced switching compilation of ipsumgenera between compiler versions 0.9.6 and 0.9.4, so it is likely some standard library proc started to be more picky.

gradha avatar Dec 08 '14 11:12 gradha

Is this really an ipsumgenera issue? Perhaps it's an issue to do with Nim's stdlib?

dom96 avatar Dec 09 '14 21:12 dom96

The ipsumgenera specific issue would be using an external encoding proc which does more than actually is required for HTML.

gradha avatar Dec 09 '14 22:12 gradha