[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mandoc-discuss
Subject:    deroff -> demandoc
From:       Kristaps Dzonsons <kristaps () bsd ! lv>
Date:       2011-09-01 10:54:58
Message-ID: 4E5F6482.8040608 () bsd ! lv
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic