more cleanup of the rendering for the case when (format "~s" x)
and (format "~a" x) are different (when 'x' is a symbol)
This commit is contained in:
parent
6960767508
commit
c91d004729
|
@ -58,7 +58,7 @@
|
|||
[(string? e)
|
||||
(values line col (+ col (string-length e)))]
|
||||
[(symbol? e)
|
||||
(values line col (+ col (string-length (symbol->string e))))]
|
||||
(values line col (+ col (string-length (format "~s" e))))]
|
||||
[(not e) (values line col col)]
|
||||
[else
|
||||
(let loop ([lws e]
|
||||
|
|
|
@ -54,6 +54,25 @@
|
|||
(make-pict-token 0 1 'pict)
|
||||
(make-pict-token 1 0 'pict)))))
|
||||
|
||||
(test (replace-pict-tokens
|
||||
(build-lines
|
||||
'(|+1|)
|
||||
(normalize-lw
|
||||
(to-lw
|
||||
,(term
|
||||
(|+1| x))))))
|
||||
(list (make-line 0
|
||||
(list (make-spacer-token 0 2)
|
||||
(make-string-token 2 1 "(" 'roman)
|
||||
(make-string-token 3 4 "+1" '(italic . roman))
|
||||
(make-string-token 7 1 " " 'roman)
|
||||
(make-string-token 8 1 "x" 'swiss)
|
||||
(make-string-token 9 1 ")" 'roman)))
|
||||
(make-line 0
|
||||
(list (make-string-token 0 0 "" 'roman)
|
||||
(make-pict-token 0 1 'pict)
|
||||
(make-pict-token 1 0 'pict)))))
|
||||
|
||||
(test (replace-pict-tokens
|
||||
(build-lines
|
||||
'()
|
||||
|
|
Loading…
Reference in New Issue
Block a user