~dieggsy/chalk

cdcfb70eea817ddc13727771d6b0b8d95f43e69d — dieggsy 3 years ago 4c44c91 0.3.4
Allow for multiple strings as description
3 files changed, 11 insertions(+), 6 deletions(-)

M chalk-bin.scm
M chalk.release-info
M chalk.svnwiki
M chalk-bin.scm => chalk-bin.scm +4 -1
@@ 10,6 10,7 @@
              pathname-directory
              pathname-extension
              pathname-file)
        (only chicken.string string-intersperse)
        (only srfi-1
              find
              filter


@@ 88,7 89,9 @@
        doc))

(define (find-docstr doc)
  (find string? doc))
  (let ((strings (filter string? doc)))
    (and (not (null? strings))
         (string-intersperse strings "\n\n"))))

(define (document-procedure exp #!optional (type 'procedure))
  (let* ((doc (fourth exp))

M chalk.release-info => chalk.release-info +1 -0
@@ 1,5 1,6 @@
;; -*- mode: scheme -*-
(uri targz "https://code.dieggsy.com/chicken-{egg-name}/snapshot/chicken-{egg-name}-{egg-release}.tar.gz")
(release "0.3.4")
(release "0.3.3")
(release "0.3.2")
(release "0.3.1")

M chalk.svnwiki => chalk.svnwiki +6 -5
@@ 14,9 14,7 @@ one or more files.

The following is hahn's fibonacci example, rewritten for chalk. Note key
differences: The example is simply a string (and therefore not evaluated),
whith the option of a {{@pre}} or {{@post}} caption. Additionally, the
docstring must be contained within a single string and a heading is not
generated for the procedure name.
whith the option of a {{@pre}} or {{@post}} caption.

<enscript highlight="scheme">
(define (fibonacci n)


@@ 62,9 60,11 @@ Documentation entails inserting a docexpr of the following form before the
{{BODY}}.

<enscript>
@("Description" [OPTION] ...)
@("Description" ... [OPTION] ...)
</enscript>

Multiple top-level strings in the docexpr are turned into separate wiki paragraphs.

==== Variables
Variables are documented as follows, ignoring potentially disastrous rounding practices:
<enscript highlight="scheme">


@@ 97,7 97,7 @@ Procedures are documented similarly, but can contain the tags, {{@to}}, and
  (baz))
</enscript>

In the case of procedures defined as variables, chalk considers it a variable
In the case of procedures defined as variables, chalk considers them variables
by default, using the function name as a signature. In either case, you can
override the default signature with the tag {{@sig}}, and you can specify that
it is indeed a procedure as follows:


@@ 266,6 266,7 @@ Diego A. Mundo

=== Version History

; 0.3.3 : Allow multiple strings as description
; 0.3.3 : Reduce line spacing, change license options
; 0.3.2 : Add multi-line script support
; 0.3.1 : Fix bug: release-info not ignored on ignore-egg