mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 19:20:23 +02:00
texinfo: Add basic support for @w{...}.
* module/texinfo.scm (texi-command-specs): Add 'w'. (space-significant?): Add it. * module/texinfo/html.scm (tag-replacements): Add 'w'. * test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add test.
This commit is contained in:
parent
5fbf5c10fc
commit
a43aa1bc79
3 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;;; (texinfo) -- parsing of texinfo into SXML
|
;;;; (texinfo) -- parsing of texinfo into SXML
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2020 Free Software Foundation, Inc.
|
||||||
;;;; Copyright (C) 2004, 2009 Andy Wingo <wingo at pobox dot com>
|
;;;; Copyright (C) 2004, 2009 Andy Wingo <wingo at pobox dot com>
|
||||||
;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com>
|
;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com>
|
||||||
;;;;
|
;;;;
|
||||||
|
@ -211,6 +211,7 @@ lambda. Only present for @code{INLINE-ARGS}, @code{EOL-ARGS},
|
||||||
(sansserif INLINE-TEXT)
|
(sansserif INLINE-TEXT)
|
||||||
(slanted INLINE-TEXT)
|
(slanted INLINE-TEXT)
|
||||||
(t INLINE-TEXT)
|
(t INLINE-TEXT)
|
||||||
|
(w INLINE-TEXT)
|
||||||
|
|
||||||
;; Inline args commands
|
;; Inline args commands
|
||||||
(value INLINE-ARGS . (key))
|
(value INLINE-ARGS . (key))
|
||||||
|
@ -382,7 +383,7 @@ Examples:
|
||||||
;; The % is for arguments
|
;; The % is for arguments
|
||||||
(define (space-significant? command)
|
(define (space-significant? command)
|
||||||
(memq command
|
(memq command
|
||||||
'(example smallexample verbatim lisp smalllisp menu %)))
|
'(example smallexample verbatim lisp smalllisp menu w %)))
|
||||||
|
|
||||||
;; Like a DTD for texinfo
|
;; Like a DTD for texinfo
|
||||||
(define (command-spec command)
|
(define (command-spec command)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; (texinfo html) -- translating stexinfo into shtml
|
;;;; (texinfo html) -- translating stexinfo into shtml
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2009, 2010, 2011, 2020 Free Software Foundation, Inc.
|
||||||
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
|
;;;; Copyright (C) 2003,2004,2009 Andy Wingo <wingo at pobox dot com>
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -202,6 +202,7 @@ name, @code{#}, and the node name."
|
||||||
(*fragment* div) ;; should be ok
|
(*fragment* div) ;; should be ok
|
||||||
|
|
||||||
(asis span)
|
(asis span)
|
||||||
|
(w span (@ (class "verbatim")))
|
||||||
(bold b)
|
(bold b)
|
||||||
(i i)
|
(i i)
|
||||||
(sample samp)
|
(sample samp)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;;; texinfo.test -*- scheme -*-
|
;;;; texinfo.test -*- scheme -*-
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2010, 2011, 2012, 2013, 2014, 2020 Free Software Foundation, Inc.
|
||||||
;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com>
|
;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com>
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -221,6 +221,8 @@
|
||||||
'((para (code "abc " (code)))))
|
'((para (code "abc " (code)))))
|
||||||
(test-body "@code{ arg }"
|
(test-body "@code{ arg }"
|
||||||
'((para (code "arg"))))
|
'((para (code "arg"))))
|
||||||
|
(test-body "@w{ arg with spaces }"
|
||||||
|
'((para (w " arg with spaces "))))
|
||||||
|
|
||||||
(test-body "@acronym{GNU}"
|
(test-body "@acronym{GNU}"
|
||||||
'((para (acronym (% (acronym "GNU"))))))
|
'((para (acronym (% (acronym "GNU"))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue