Skip to content

Commit

Permalink
feat: switch to use big-text properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sorawee committed Jul 19, 2023
1 parent 840dc17 commit a7c0089
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
racket/stxparam
syntax/parse/define
(except-in pretty-expressive flatten)
(only-in (submod pretty-expressive/doc private) make-text)
"common.rkt"
(for-syntax racket/base syntax/parse/lib/function-header))

Expand Down Expand Up @@ -55,14 +54,14 @@
(memoize (λ (d)
(match d
[(newl n) (full (v-concat (make-list n empty-doc)))]
[(full-atom _ content _) (full (text content))]
[(full-atom _ content 'string)
(full (big-text content))]
[(atom comment content type)
(pretty-comment
comment
(make-text content
(match type
['block-comment (apply max (map string-length (string-split content "\n")))]
[_ (string-length content)])))]
(match type
['block-comment (big-text content)]
[_ (text content)]))]
[(line-comment comment) (full (text comment))]
[(node _ _ _ _ _ xs)
(match (extract xs (list #f))
Expand Down

0 comments on commit a7c0089

Please sign in to comment.