start indenter
parent
dd67b321d5
commit
4a195ef050
@ -1,12 +1,9 @@
|
||||
#lang br
|
||||
(require racket/class)
|
||||
(require racket/class describe)
|
||||
(provide drracket-indenter)
|
||||
|
||||
(define (drracket-indenter t pos)
|
||||
#;(with-handlers ([exn:fail? (λ(exn) #f)]) ; this function won't work until gui-lib 1.26
|
||||
(send t compute-racket-amount-to-indent pos (λ(x)
|
||||
(case x
|
||||
[("with-pattern" "with-shared-id") 'lambda]
|
||||
[("define-macro") 'define]
|
||||
[else #f]))))
|
||||
#f)
|
||||
(define (drracket-indenter txt pos)
|
||||
(define i (char->integer (send txt get-character pos)))
|
||||
(if (zero? i)
|
||||
#f
|
||||
i))
|
@ -1,7 +1,9 @@
|
||||
#lang br/demo/jsonic
|
||||
{
|
||||
"string": @$(string-append "foo" "bar")$@,
|
||||
"array": @$(range 5)$@,
|
||||
"object": @$(hash "k1" "valstring" (format "~a" 42) (hash "k1" (range 10) "k2" 42))$@
|
||||
// "bar" :
|
||||
}
|
||||
#lang br/demo/jsonic
|
||||
{
|
||||
"string": @$(string-append "foo" "bar")$@,
|
||||
{
|
||||
"array": @$(range 5)$@,
|
||||
"object": @$(hash "k1" "valstring" (format "~a" 42) (hash "k1" (range 10) "k2" 42))$@
|
||||
}
|
||||
// "bar" :
|
||||
}
|
Loading…
Reference in New Issue