summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bk_text.c2
-rw-r--r--bk_xhtml.c25
2 files changed, 15 insertions, 12 deletions
diff --git a/bk_text.c b/bk_text.c
index 73c4cea..3bec969 100644
--- a/bk_text.c
+++ b/bk_text.c
@@ -581,6 +581,6 @@ static void text_versionid(FILE *fp, word *text) {
text_rdaddwc(&t, text, NULL);
rdaddc(&t, ']'); /* FIXME: configurability */
- fprintf(fp, "%s\n\n", t.text);
+ fprintf(fp, "%s\n", t.text);
sfree(t.text);
}
diff --git a/bk_xhtml.c b/bk_xhtml.c
index d3056eb..5e0ad10 100644
--- a/bk_xhtml.c
+++ b/bk_xhtml.c
@@ -70,7 +70,6 @@ typedef struct {
wchar_t *author, *description;
wchar_t *head_end, *body, *body_start, *body_end, *address_start, *address_end;
int suppress_address;
- word *version_id;
} xhtmlconfig;
/*static void xhtml_level(paragraph *, int);
@@ -81,7 +80,7 @@ static void xhtml_dobody(FILE *, paragraph *, int);*/
static void xhtml_doheader(FILE *, word *);
static void xhtml_dofooter(FILE *);
-static void xhtml_versionid(FILE *, word *);
+static void xhtml_versionid(FILE *, word *, int);
static void xhtml_utostr(wchar_t *, char **);
static int xhtml_para_level(paragraph *);
@@ -125,7 +124,6 @@ static xhtmlconfig xhtml_configure(paragraph *source)
ret.leaf_smallest_contents = 4;
ret.leaf_contains_contents = FALSE;
ret.include_version_id = TRUE;
- ret.version_id = NULL;
ret.author = NULL;
ret.description = NULL;
ret.head_end = NULL;
@@ -183,10 +181,6 @@ static xhtmlconfig xhtml_configure(paragraph *source)
ret.address_end = uadv(source->keyword);
}
}
- else if (source->type == para_VersionID)
- {
- ret.version_id = source->words;
- }
}
/* printf(" !!! leaf_level = %i\n", ret.leaf_level);
@@ -1120,8 +1114,15 @@ static void xhtml_dofooter(FILE *fp)
if (conf.address_start)
fprintf(fp, "%ls\n", conf.address_start);
/* Do the version ID */
- if (conf.include_version_id && conf.version_id)
- xhtml_versionid(fp, conf.version_id);
+ if (conf.include_version_id) {
+ paragraph *p;
+ int started = 0;
+ for (p = sourceparas; p; p = p->next)
+ if (p->type == para_VersionID) {
+ xhtml_versionid(fp, p->words, started);
+ started = 1;
+ }
+ }
if (conf.address_end)
fprintf(fp, "%ls\n", conf.address_end);
fprintf(fp, "</address>\n");
@@ -1133,7 +1134,7 @@ static void xhtml_dofooter(FILE *fp)
* Output the versionid paragraph. Typically this is a version control
* ID string (such as $Id...$ in RCS).
*/
-static void xhtml_versionid(FILE *fp, word *text)
+static void xhtml_versionid(FILE *fp, word *text, int started)
{
rdstringc t = { 0, 0, NULL };
@@ -1141,7 +1142,9 @@ static void xhtml_versionid(FILE *fp, word *text)
xhtml_rdaddwc(&t, text, NULL);
rdaddc(&t, ']'); /* FIXME: configurability */
- fprintf(fp, "%s\n\n", t.text);
+ if (started)
+ fprintf(fp, "<br>\n");
+ fprintf(fp, "%s\n", t.text);
sfree(t.text);
}