public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Dev Null <dev.null9675234-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Failed to recognize headers from DevOps wiki missing a leading space
Date: Tue, 22 Nov 2022 14:39:25 -0800 (PST)	[thread overview]
Message-ID: <9798935e-bb5a-4164-a68e-633a198d69ecn@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1600 bytes --]

Hi All,

New to pandoc, and trying to use it to create a Word doc that is a dump of 
our DevOps wiki tree.  It's failing to recognize some of the headers as 
headers, because Microsoft didn't follow the standard (*gasp!*) or possibly 
because I'm using the wrong from format?  (I've been using commonmark_x as 
the from format, at the suggestion of the friend who pointed me at pandoc 
in the first place, but I've tried a few others as well to no avail.)

A header like:

# thing1

works fine, but a header like:

#thing2 (without the space)

does not.  I looked at using Lua filters, but it seems too late; pandoc 
isn't reconising it as a header in the first place, as evidenced by 
converting it to native:

[ Header 3 ( "thing1" , [] , [] ) [ Str "thing1" ]
, Para [ Str "stuff" ]
, Para
    [ Str "#thing2"
    , Space
    , Str "(without"
    , Space
    , Str "the"
    , Space
    , Str "space)"
    ]
, Para [ Str "more" , Space , Str "stuff" ]
]

I can just script-bash up something horrible to s/^(#+)(\S.*)$/\1 \2/ 
everything, but who knows what I'd break, or what else I'd miss, and that 
way lies madness.  Hoping there's a cleaner fix?

Thanks for any advice,

    - rob.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/9798935e-bb5a-4164-a68e-633a198d69ecn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2266 bytes --]

             reply	other threads:[~2022-11-22 22:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 22:39 Dev Null [this message]
     [not found] ` <9798935e-bb5a-4164-a68e-633a198d69ecn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-22 22:46   ` John MacFarlane
     [not found]     ` <923D39E7-49FB-4702-B867-0AAC618B4CF8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-23  0:20       ` Dev Null

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=9798935e-bb5a-4164-a68e-633a198d69ecn@googlegroups.com \
    --to=dev.null9675234-re5jqeeqqe8avxtiumwx3w@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).