-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
add template variables for source and destination filename #3439
Conversation
5145790
to
9a3b112
Compare
9a3b112
to
c9bc4eb
Compare
I'd prefer:
If you want to have it print
What do you think? |
c9bc4eb
to
d488dc9
Compare
Yes, this makes the code simpler, and simplicity is always a good idea. I've allowed myself to put your template snippet into the manual as an example how to handle the variables. Looking at the tests, I find it a bit annoying that conversion to markdown now writes the sourcefile and outputfile into the Markdown output – I really only had intended them to be used in user-defined templates. What do you think, does that bother you? |
(see Travis log, L705) |
+++ Roland Hieber [Feb 24 17 18:34 ]:
(see [1]Travis log, L705)
This is precisely why you need to add them as variables,
not as metadata.
|
On 25.02.2017 12:50, John MacFarlane wrote:
+++ Roland Hieber [Feb 24 17 18:34 ]:
> (see [1]Travis log, L705)
This is precisely why you need to add them as variables,
not as metadata.
Wait, I'm confused. In [1] you said I should add them to
writerVariables, and I think that's what I did here. Is there some place
else where I should add them?
[1] #3431 (comment)
|
No, you did the right thing. I jumped to conclusions from the travis output, but in fact this seems to point to a bug somewhere else... I'll investigate. |
This allows us to add the variables AFTER using the metadata to generate a YAML header (in the Markdown writer). Addresses the problem shown by https://travis-ci.org/jgm/pandoc/jobs/205154181#L705 See #3439
OK, this should be fixed now. |
I fixed a few more things with subsequent commits. Glad you unearthed that bug; the Markdown writer was leaking variables in metadata blocks. |
We're always on the lookout for new contributors!
+++ Roland Hieber [Feb 25 17 18:05 ]:
… Happy to help 😄 But more importantly, happy for your help and patience,
***@***.*** and ***@***.***! This was a great opportunity for me to get to
know Haskell and pandoc more 😃
|
see #3431