Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Scheme language detection fail #250

Closed
GoogleCodeExporter opened this issue Apr 22, 2015 · 2 comments
Closed

Scheme language detection fail #250

GoogleCodeExporter opened this issue Apr 22, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

The following code is scheme (GNU Guile) and the language detector fails to 
detect it correctly:

<pre class="prettyprint"><code>(define (cont-frac-rec numer denom k)
    (define (step i)
        (if (&gt; i k) 0
        (/ (numer i) (+ (denom i) (step (1+ i))))))
    (step 1))

(define (cont-frac-iter numer denom k)
    (define (step tally i)
        (if (&lt; i 1) tally
        (step (/ (numer i) (+ tally (denom i))) (1- i))))
    (step 0.0 k))

(define (cont-frac numer denom k)
    ; (cont-frac-rec numer denom k)
    (cont-frac-iter numer denom k)
)

(let ((phiInverse (cont-frac (lambda (i) 1.0) (lambda (i) 1.0) 20)))
        (if (or (&gt; phiInverse 0.6181) (&lt; phiInverse 0.6180))
        (display (string-append "FAIL: " (number-&gt;string phiInverse))) #t))
</code></pre>


Workaround is to specify the language in the class, which I am able to do due 
to issue 224.

Original issue reported on code.google.com by Sam.Hall...@gmail.com on 20 Oct 2012 at 5:59

@GoogleCodeExporter
Copy link
Author

I am looking at the suggestions in 224, and will reconsider this use-case once 
that issue is settled.

Original comment by mikesamuel@gmail.com on 4 Feb 2013 at 10:50

@amroamroamro
Copy link
Contributor

Issue #224 added the ability to specify language hint in a preceding HTML comment which should survive markdown-to-html conversion.

So now this works: https://jsfiddle.net/amroamroamro/fhxyxLve/

(of course specifying lang hint directly in class is still supported).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants