discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: deroff -> demandoc
Date: Thu, 01 Sep 2011 12:54:58 +0200	[thread overview]
Message-ID: <4E5F6482.8040608@bsd.lv> (raw)

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

                 reply	other threads:[~2011-09-01 10:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E5F6482.8040608@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).