Arc Forumnew | comments | leaders | submitlogin
1 point by wfarr 5906 days ago | link | parent

"Here I am typing normally. Yey, fun, etc.

  (def mycode (goes here)
    (pr "for sure"))
This paragraph isn't wrapped as a paragraph! =(

But this one is! =/"

Where newline's would've been converted to \n, etc.



1 point by almkglor 5906 days ago | link

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 5906 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.

-----