From 1753100d98167b6205183e1011c15af1f76612b0 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 23 May 2019 12:45:13 -0700 Subject: [PATCH] insert a placeholder for bullet (fixes #14) --- quad/quadwriter/core.rkt | 4 +++- quad/quadwriter/tags.rkt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/quad/quadwriter/core.rkt b/quad/quadwriter/core.rkt index f82fa2c3..550c3275 100644 --- a/quad/quadwriter/core.rkt +++ b/quad/quadwriter/core.rkt @@ -16,7 +16,7 @@ "attrs.rkt" "param.rkt" "font.rkt") -(provide para-break line-break page-break hrbr lbr pbr render-pdf) +(provide para-break line-break page-break bullet-quad hrbr lbr pbr render-pdf) (define-quad string-quad quad ()) @@ -273,6 +273,8 @@ (define (make-hr-quad line-q) (struct-copy quad line-q [draw-start hr-draw])) +(define bullet-quad '(q ((special "bullet")))) + (define ((finish-line-wrap line-q) pcs-in opening-q ending-q idx) ;; we curry line-q so that the wrap size can be communicated to this operation ;; remove unused soft hyphens so they don't affect final shaping diff --git a/quad/quadwriter/tags.rkt b/quad/quadwriter/tags.rkt index 08a28600..a156c4bf 100644 --- a/quad/quadwriter/tags.rkt +++ b/quad/quadwriter/tags.rkt @@ -103,4 +103,4 @@ (define-tag-function (ol attrs exprs) (list-base attrs exprs)) (define-tag-function (ul attrs exprs) (list-base attrs exprs "•")) -(define-tag-function (li attrs exprs) (qexpr attrs exprs)) \ No newline at end of file +(define-tag-function (li attrs exprs) (qexpr attrs (cons bullet-quad exprs))) \ No newline at end of file