public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Benct Philip Jonsson <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Can't access keys containing spaces in pandoc
Date: Tue, 3 Sep 2019 19:20:43 +0200	[thread overview]
Message-ID: <33895bfe-75ea-cbe3-d484-530ef2ee8314@gmail.com> (raw)
In-Reply-To: <330c5975-5678-26fa-e517-2a9ca612a383-Jdbf3xiKgS8@public.gmane.org>

On 2019-09-03 18:35, Daniel Staal wrote:
> On 9/3/19 12:25 PM, John MacFarlane wrote:
>> There are two possible approaches here.
>>
>> 1. Modify doctemplates (our templating engine) to allow spaces in
>> variables.  This would mean allowing things like
>>
>> $this is a long variable name$
>>
>> in a template.  I think this kind of thing makes it less clear
>> where the variables are, but it shouldn't pose any problem in principle.
>>
>> 2. Modify pandoc so that, when metadata is used to populate
>> template variables, spaces are automatically replaced by
>> underscores.  In this case you'd use
>>
>> $this_is_a_long_variable_name$
>>
>> in your template.
> 
> I'd *strongly* prefer the latter.  

So would I. Replacing all sequences of non-(ASCII)alphanumerics with an 
underscore is the usual way to convert arbitrary strings to identifiers, 
after all.

> 

-- 
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/33895bfe-75ea-cbe3-d484-530ef2ee8314%40gmail.com.


  parent reply	other threads:[~2019-09-03 17:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02  9:10 Frederik Hartmann
     [not found] ` <92055fd0-049b-4943-a51a-2eb0905b59ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-02  9:37   ` James
     [not found]     ` <5E6256F2-6354-43F9-9A49-2328471A9D2B-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-09-02 10:32       ` Frederik Hartmann
     [not found]         ` <68fbd484-0729-4ee2-a7a2-0846cd0bbd28-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-02 17:28           ` John MacFarlane
     [not found]             ` <m2tv9uboau.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-09-02 20:19               ` Frederik Hartmann
     [not found]                 ` <7c15c170-1b08-4274-b24e-280b4585c0c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-03 16:25                   ` John MacFarlane
     [not found]                     ` <yh480k8sr5z6r1.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-09-03 16:35                       ` Daniel Staal
     [not found]                         ` <330c5975-5678-26fa-e517-2a9ca612a383-Jdbf3xiKgS8@public.gmane.org>
2019-09-03 17:20                           ` Benct Philip Jonsson [this message]
2019-09-04  5:33                     ` jiewuza
     [not found]                       ` <m2o900wrpc.fsf-9Onoh4P/yGk@public.gmane.org>
2019-09-04  8:39                         ` Frederik Hartmann
     [not found]                           ` <35a9acd1-dff5-4529-9abb-d8f9fc87bce4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-06 20:31                             ` BPJ

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=33895bfe-75ea-cbe3-d484-530ef2ee8314@gmail.com \
    --to=melroch-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).