main hyphenate-v0.2
Matthew Butterick 8 years ago
parent b94e768364
commit 026df65410

@ -1,3 +0,0 @@
#lang racket/base
(require hyphenate/bootstrap)
(build-main fr)

@ -1 +0,0 @@
#lang hyphenate/exception-prep

@ -0,0 +1,3 @@
#lang racket/base
(require "private/bootstrap.rkt")
(build-main fr)

@ -0,0 +1 @@
#lang hyphenate/private/exception-prep

@ -1,4 +1,4 @@
#lang hyphenate/pattern-prep
#lang hyphenate/private/pattern-prep
#|

@ -5,13 +5,13 @@
(define-syntax (build-main stx)
(syntax-case stx ()
[(_ dir)
(with-syntax ([patterns-path (datum->syntax stx (format "~a/patterns.rkt" (syntax->datum #'dir)))]
[exceptions-path (datum->syntax stx (format "~a/exceptions.rkt" (syntax->datum #'dir)))])
(with-syntax ([patterns-path (format "~a/patterns.rkt" (syntax->datum #'dir))]
[exceptions-path (format "~a/exceptions.rkt" (syntax->datum #'dir))])
(replace-context stx
#'(begin
(require txexpr sugar/define (only-in xml xexpr/c)
(prefix-in core: hyphenate/core) hyphenate/params patterns-path exceptions-path)
(provide (all-from-out hyphenate/params))
(require txexpr/base sugar/define (only-in xml xexpr/c)
(prefix-in core: hyphenate/private/core) hyphenate/private/params patterns-path exceptions-path)
(provide (all-from-out hyphenate/private/params))
(module+ safe
;; An exception-word is a string of word characters or hyphens.

@ -1,5 +1,5 @@
#lang racket/base
(require txexpr racket/string racket/list "params.rkt")
(require txexpr/base racket/string racket/list "params.rkt")
(provide hyphenate unhyphenate word->hyphenation-points convert-exception-word string->hashpair)
;; module default values
@ -143,7 +143,7 @@
(make-txexpr (get-tag x) (get-attrs x) (map loop (get-elements x)))]
[else x])))
(require sugar/debug)
(define (hyphenate x [joiner default-joiner]
#:exceptions [extra-exceptions empty]
#:min-length [min-length default-min-length]

@ -12,6 +12,6 @@
(with-syntax ([str (port->string in)])
(strip-context
#'(module exception-prep racket/base
(require racket/string racket/list hyphenate/core)
(require racket/string racket/list hyphenate/private/core)
(provide exceptions)
(define exceptions (apply hash (append-map convert-exception-word (string-split str)))))))))

@ -12,6 +12,6 @@
(with-syntax ([str (port->string in)])
(strip-context
#'(module pattern-prep racket/base
(require hyphenate/core racket/list racket/string)
(require hyphenate/private/core racket/list racket/string)
(provide patterns)
(define patterns (apply hash (append-map string->hashpair (string-split str)))))))))

@ -1,5 +1,5 @@
#lang racket/base
(require (submod hyphenate safe) txexpr rackunit)
(require (submod hyphenate safe) txexpr/base rackunit)
(define omit-em-tag (λ(x) (member (car x) '(em))))
(define omit-p-tag (λ(x) (member (car x) '(p))))

@ -0,0 +1,3 @@
#lang racket/base
(require "private/bootstrap.rkt")
(build-main us)

@ -1,4 +1,4 @@
#lang hyphenate/exception-prep
#lang hyphenate/private/exception-prep
as-so-ciate
as-so-ciates
dec-li-na-tion

File diff suppressed because one or more lines are too long

@ -1,8 +1,8 @@
#lang info
(define version "0.1")
(define collection "hyphenate")
(define deps '("base" "sugar" "txexpr" "rackunit-lib"))
(define version "0.2")
(define collection 'multi)
(define deps '("base" ["sugar" #:version "0.2"] ["txexpr" #:version "0.2"]))
(define update-implies '("txexpr" "sugar"))
(define build-deps '("scribble-lib" "racket-doc"))
(define scribblings '(("scribblings/hyphenate.scrbl" ())))
(define compile-omit-paths '("tests.rkt"))
(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib"))
(define scribblings '(("hyphenate/scribblings/hyphenate.scrbl" ())))
(define compile-omit-paths '("hyphenate/tests.rkt"))

@ -1,3 +0,0 @@
#lang racket/base
(require hyphenate/bootstrap)
(build-main us)
Loading…
Cancel
Save