Arc Forumnew | comments | leaders | submitlogin
1 point by almkglor 6105 days ago | link | parent

The bug appears to be that code-block consumes all whitespace after it. However, the paragraph detector expects to see some newlines. Hmm.


1 point by almkglor 6105 days ago | link

Grr. Possibly just have it print </code></pre><p> instead >.<

Edit: Okay. Here's the diff:

  diff --git a/app.arc b/app.arc
  index 912a1ad..8106695 100644
  --- a/app.arc
  +++ b/app.arc
  @@ -421,7 +421,7 @@
                  (do (pr  "<p><pre><code>")
                    (let cb (code-block s (- newi spaces 1))
                      (pr cb)
  -                   (= i (+ (- newi spaces 1) (len cb))))
  +                   (= i (+ (- newi spaces 2) (len cb))))
                    (pr "</code></pre>"))
                  (iflet newi (parabreak s i (if (is i 0) 1 0))
                         (do (unless (is i 0) (pr "<p>"))
Why the change to 2? Because cb itself has a lookahead problem. Or maybe not, grr.

-----