discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* deroff -> demandoc
@ 2011-09-01 10:54 Kristaps Dzonsons
  0 siblings, 0 replies; only message in thread
From: Kristaps Dzonsons @ 2011-09-01 10:54 UTC (permalink / raw)
  To: discuss

Hi,

I've added the demandoc utility to the mdocml suite.  I did this becaus 
I noticed the deroff has some issues: it unilaterally strips away macro 
lines (including their text) and doesn't always regard escapes.  Also:

% demandoc mandoc.1 | spell -b

demandoc retains the line number AND column of its input, strips out 
escapes, and correctly handles macro lines in both -man and -mdoc (it 
uses libmandoc, obviously).  It's also just a tiny source file.

Examples:

% cat -n foo.1
      1	.Dd $Mdocdate$
      2	.Dt FOO 1
      3	.Os
      4	.Sh NAME
      5	.Nm foo
      6	.Nd bar
      7	.Sh DESCRIPTION
      8	Hi there.
% ./demandoc foo.1 | cat -n
      1	
      2	
      3	
      4	    NAME
      5	    foo
      6	    bar
      7	    DESCRIPTION
      8	Hi there.

Thoughts?

Kristaps
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-01 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 10:54 deroff -> demandoc Kristaps Dzonsons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).