diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-03-20 14:19:29 -0400 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-04-02 11:09:06 +0200 |
| commit | 8603bcd5822a1a8364a7a74a698059d3d147568b (patch) | |
| tree | b9e64a630a9436883dddadd5d3d183b7dbc0afca | |
| parent | f350df405fbcd5b9e27e6b6aa500da7f101f41e7 (diff) | |
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.
| -rw-r--r-- | doc/build.scm | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/doc/build.scm b/doc/build.scm index d77fc0a7009..e96df1991fb 100644 --- a/doc/build.scm +++ b/doc/build.scm | |||
| @@ -182,32 +182,6 @@ as well as images, OS examples, and translations." | |||
| 182 | "-c" "EXTRA_HEAD=<meta name=\"viewport\" \ | 182 | "-c" "EXTRA_HEAD=<meta name=\"viewport\" \ |
| 183 | content=\"width=device-width, initial-scale=1\" />")) | 183 | content=\"width=device-width, initial-scale=1\" />")) |
| 184 | 184 | ||
| 185 | (define guile-lib/htmlprag-fixed | ||
| 186 | ;; Guile-Lib with a hotfix for (htmlprag). | ||
| 187 | (package | ||
| 188 | (inherit guile-lib) | ||
| 189 | (arguments | ||
| 190 | (substitute-keyword-arguments (package-arguments guile-lib) | ||
| 191 | ((#:phases phases '%standard-phases) | ||
| 192 | `(modify-phases ,phases | ||
| 193 | (add-before 'build 'fix-htmlprag | ||
| 194 | (lambda _ | ||
| 195 | ;; When parsing | ||
| 196 | ;; "<body><blockquote><p>foo</p>\n</blockquote></body>", | ||
| 197 | ;; 'html->shtml' would mistakenly close 'blockquote' right | ||
| 198 | ;; before <p>. This patch removes 'p' from the | ||
| 199 | ;; 'parent-constraints' alist to fix that. | ||
| 200 | (substitute* "src/htmlprag.scm" | ||
| 201 | (("^[[:blank:]]*\\(p[[:blank:]]+\\. \\(body td th\\)\\).*") | ||
| 202 | "")) | ||
| 203 | #t)) | ||
| 204 | (add-before 'check 'skip-known-failure | ||
| 205 | (lambda _ | ||
| 206 | ;; XXX: The above change causes one test failure among | ||
| 207 | ;; the htmlprag tests. | ||
| 208 | (setenv "XFAIL_TESTS" "htmlprag.scm") | ||
| 209 | #t)))))))) | ||
| 210 | |||
| 211 | (define (normalize-language-code language) ;XXX: deduplicate | 185 | (define (normalize-language-code language) ;XXX: deduplicate |
| 212 | ;; Normalize LANGUAGE. For instance, "zh_CN" becomes "zh-cn". | 186 | ;; Normalize LANGUAGE. For instance, "zh_CN" becomes "zh-cn". |
| 213 | (string-map (match-lambda | 187 | (string-map (match-lambda |
| @@ -224,7 +198,7 @@ key is an identifier and the associated value is the URL reference pointing to | |||
| 224 | that identifier. The URL is constructed by concatenating BASE-URL to the | 198 | that identifier. The URL is constructed by concatenating BASE-URL to the |
| 225 | actual file name." | 199 | actual file name." |
| 226 | (define build | 200 | (define build |
| 227 | (with-extensions (list guile-lib/htmlprag-fixed) | 201 | (with-extensions (list guile-lib) |
| 228 | (with-imported-modules '((guix build utils)) | 202 | (with-imported-modules '((guix build utils)) |
| 229 | #~(begin | 203 | #~(begin |
| 230 | (use-modules (guix build utils) | 204 | (use-modules (guix build utils) |
| @@ -236,6 +210,8 @@ actual file name." | |||
| 236 | (ice-9 threads) | 210 | (ice-9 threads) |
| 237 | (ice-9 pretty-print)) | 211 | (ice-9 pretty-print)) |
| 238 | 212 | ||
| 213 | (%strict-tokenizer? #t) | ||
| 214 | |||
| 239 | (define file-url | 215 | (define file-url |
| 240 | (let ((prefix (string-append #$manual "/"))) | 216 | (let ((prefix (string-append #$manual "/"))) |
| 241 | (lambda (file) | 217 | (lambda (file) |
| @@ -380,7 +356,7 @@ actual file name." | |||
| 380 | to (1) add them a link to SYNTAX-CSS-URL, and (2) highlight the syntax of all | 356 | to (1) add them a link to SYNTAX-CSS-URL, and (2) highlight the syntax of all |
| 381 | its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')." | 357 | its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')." |
| 382 | (define build | 358 | (define build |
| 383 | (with-extensions (list guile-lib/htmlprag-fixed guile-syntax-highlight) | 359 | (with-extensions (list guile-lib guile-syntax-highlight) |
| 384 | (with-imported-modules '((guix build utils)) | 360 | (with-imported-modules '((guix build utils)) |
| 385 | #~(begin | 361 | #~(begin |
| 386 | (use-modules (htmlprag) | 362 | (use-modules (htmlprag) |
| @@ -394,6 +370,8 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')." | |||
| 394 | (ice-9 threads) | 370 | (ice-9 threads) |
| 395 | (ice-9 vlist)) | 371 | (ice-9 vlist)) |
| 396 | 372 | ||
| 373 | (%strict-tokenizer? #t) | ||
| 374 | |||
| 397 | (define (pair-open/close lst) | 375 | (define (pair-open/close lst) |
| 398 | ;; Pair 'open' and 'close' tags produced by 'highlights' and | 376 | ;; Pair 'open' and 'close' tags produced by 'highlights' and |
| 399 | ;; produce nested 'paren' tags instead. | 377 | ;; produce nested 'paren' tags instead. |
