public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Daniel Staal <DStaal-Jdbf3xiKgS8@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: pandoc as a linkchecker?
Date: Sat, 12 Sep 2020 15:38:02 -0400	[thread overview]
Message-ID: <39aaa3fd-e0c8-4580-761b-607d6e9311f9@usa.net> (raw)
In-Reply-To: <f87a3346-3243-0cd4-a101-107e5ffe4902-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>

On 9/12/20 3:12 PM, Joseph Reagle wrote:
> Pandoc already chases links for `self-contained`, so I suspect this wouldn't be hard. Bonus: could it report the line of a markdown file where a broken link is?

I suspect the problem would be with Pandoc's definition of 'line' and 
'file'.  Pandoc like many unix tools only really appears to read files 
as a convenience to the user - it's really reading streams of lines. 
You can pass it multiple files, and it just treats them all as one big 
stream of lines.

So I suspect Pandoc has no real idea of line numbers or files when 
working on things - it just knows that it saw an error in the current 
line being read.

(As a further complication: If you're reading markdown or similar, what 
is a 'line'?  Do you mean anything that ends with a newline, or do you 
mean any contiguous block of text that could be written as one line? 
That is: Does wrapping the text alter the number of lines in the file?)

Daniel T. Staal

-- 
---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


  parent reply	other threads:[~2020-09-12 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 19:12 Joseph Reagle
     [not found] ` <f87a3346-3243-0cd4-a101-107e5ffe4902-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2020-09-12 19:35   ` Gwern Branwen
2020-09-12 19:38   ` Daniel Staal [this message]
2020-09-12 20:19   ` Albert Krewinkel
2020-09-12 20:31   ` BPJ
     [not found]     ` <CADAJKhCpmA-g_LPufFmZxSY2dVJzYGw_S8vvsPrK2YQoHpRNNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-09-14 13:19       ` Joseph Reagle
     [not found]         ` <c5259326-1317-e43a-6416-25922630b25e-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2020-09-14 13:23           ` Gwern Branwen

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=39aaa3fd-e0c8-4580-761b-607d6e9311f9@usa.net \
    --to=dstaal-jdbf3xikgs8@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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).