X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/511e4c18cedc1987a3748e49084ab8a2ad707fe5..fb2ebae7857605ebef35d26c56cccc959812585e:/xml.c?ds=sidebyside diff --git a/xml.c b/xml.c index 257192c7..74afaa06 100644 --- a/xml.c +++ b/xml.c @@ -1,4 +1,4 @@ -/* $Id: xml.c,v 1.2 2008/11/30 23:05:57 kristaps Exp $ */ +/* $Id: xml.c,v 1.4 2008/12/01 15:32:36 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -40,7 +40,8 @@ enum md_tok { MD_BLKOUT, MD_IN, MD_OUT, - MD_TEXT + MD_TEXT, + MD_OVERRIDE }; struct md_xml { @@ -329,8 +330,19 @@ rofftail(void *arg) static int roffspecial(void *arg, int tok) { + struct md_xml *p; + + assert(arg); + p = (struct md_xml *)arg; + + switch (tok) { + case (ROFF_Ns): + p->last = MD_OVERRIDE; + break; + default: + break; + } - /* FIXME */ return(1); } @@ -481,6 +493,8 @@ roffout(void *arg, int tok) assert(arg); p = (struct md_xml *)arg; + /* Continue with a regular out token. */ + if (0 == p->pos && ! mbuf_indent(p)) return(0); @@ -543,3 +557,4 @@ roffdata(void *arg, int space, char *buf) p->last = MD_TEXT; return(1); } +