Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata block drops date if missing author #1089

Closed
league opened this issue Dec 13, 2013 · 0 comments
Closed

metadata block drops date if missing author #1089

league opened this issue Dec 13, 2013 · 0 comments

Comments

@league
Copy link

league commented Dec 13, 2013

I have documents with the old-style metadata blocks at the top:

% A Tale of Two Cities
% Charles Dickens
% 1859

but many leave the author field blank:

% A Tale of Two Cities
%
% 1859

Until recently I was using pandoc-1.9.4.5 and it would just leave out the author but still embed the date. Now, with pandoc-1.12.2.1 it will not propagate the date if the author is missing. Specifically, with pandoc -t json on the first example above produces:

[{"unMeta":{
  "author":{"t":"MetaList","c":
     [{"t":"MetaInlines","c":[{"t":"Str","c":"Charles"},{"t":"Space","c":[]},
      {"t":"Str","c":"Dickens"}]}]},
  "date":{"t":"MetaInlines","c":[{"t":"Str","c":"1859"}]},
  "title":{"t":"MetaInlines","c":[{"t":"Str","c":"A"},{"t":"Space","c":[]},
      {"t":"Str","c":"Tale"},{"t":"Space","c":[]},{"t":"Str","c":"of"},{"t":"Space","c":[]},
      {"t":"Str","c":"Two"},{"t":"Space","c":[]},{"t":"Str","c":"Cities"}]}}},[]]

and on the second example (with the missing author):

[{"unMeta":{
    "title":{"t":"MetaInlines","c":[{"t":"Str","c":"A"},{"t":"Space","c":[]},{"t":"Str","c":"Tale"},
       {"t":"Space","c":[]},{"t":"Str","c":"of"},{"t":"Space","c":[]},{"t":"Str","c":"Two"},
       {"t":"Space","c":[]},{"t":"Str","c":"Cities"}]}}},[]]

So the metadata block is missing the date, 1859.

@jgm jgm closed this as completed in 6d0cd92 Dec 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant