From 25db3b2f8bb4a18e9405d2cd32aa899e0007f236 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 20 Mar 2021 14:19:29 -0400 Subject: doc: Remove the guile-lib/htmlprag-fixed package. This hotfix package is no longer necessary as the ability to parameterize the way htmlprag tokenizes HTML was added in guile-lib 0.2.7. * doc/build.scm (guile-lib/htmlprag-fixed): Remove variable. (html-manual-identifier-index): Replace guile-lib/htmlprag-fixed by guile-lib, and make set the %strict-tokenizer? parameter to #t. (syntax-highlighted-html): Likewise. --- doc/build.scm | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/doc/build.scm b/doc/build.scm index d77fc0a700..e96df1991f 100644 --- a/doc/build.scm +++ b/doc/build.scm @@ -182,32 +182,6 @@ as well as images, OS examples, and translations." "-c" "EXTRA_HEAD=")) -(define guile-lib/htmlprag-fixed - ;; Guile-Lib with a hotfix for (htmlprag). - (package - (inherit guile-lib) - (arguments - (substitute-keyword-arguments (package-arguments guile-lib) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'build 'fix-htmlprag - (lambda _ - ;; When parsing - ;; "

foo

\n
", - ;; 'html->shtml' would mistakenly close 'blockquote' right - ;; before

. This patch removes 'p' from the - ;; 'parent-constraints' alist to fix that. - (substitute* "src/htmlprag.scm" - (("^[[:blank:]]*\\(p[[:blank:]]+\\. \\(body td th\\)\\).*") - "")) - #t)) - (add-before 'check 'skip-known-failure - (lambda _ - ;; XXX: The above change causes one test failure among - ;; the htmlprag tests. - (setenv "XFAIL_TESTS" "htmlprag.scm") - #t)))))))) - (define (normalize-language-code language) ;XXX: deduplicate ;; Normalize LANGUAGE. For instance, "zh_CN" becomes "zh-cn". (string-map (match-lambda @@ -224,7 +198,7 @@ key is an identifier and the associated value is the URL reference pointing to that identifier. The URL is constructed by concatenating BASE-URL to the actual file name." (define build - (with-extensions (list guile-lib/htmlprag-fixed) + (with-extensions (list guile-lib) (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils) @@ -236,6 +210,8 @@ actual file name." (ice-9 threads) (ice-9 pretty-print)) + (%strict-tokenizer? #t) + (define file-url (let ((prefix (string-append #$manual "/"))) (lambda (file) @@ -380,7 +356,7 @@ actual file name." to (1) add them a link to SYNTAX-CSS-URL, and (2) highlight the syntax of all its

 blocks (as produced by 'makeinfo --html')."
   (define build
-    (with-extensions (list guile-lib/htmlprag-fixed guile-syntax-highlight)
+    (with-extensions (list guile-lib guile-syntax-highlight)
       (with-imported-modules '((guix build utils))
         #~(begin
             (use-modules (htmlprag)
@@ -394,6 +370,8 @@ its 
 blocks (as produced by 'makeinfo --html')."
                          (ice-9 threads)
                          (ice-9 vlist))
 
+            (%strict-tokenizer? #t)
+
             (define (pair-open/close lst)
               ;; Pair 'open' and 'close' tags produced by 'highlights' and
               ;; produce nested 'paren' tags instead.
-- 
cgit 1.4.1