CDSoft / panda

Panda is a Pandoc Lua filter that works on internal Pandoc's AST. Panda is heavily inspired by [abp](http:/cdelord.fr/abp) reimplemented as a Pandoc Lua filter.
https://cdelord.fr/panda
GNU General Public License v3.0
43 stars 5 forks source link

Variables don't expand unless delimited by spaces #4

Closed bandel65 closed 2 years ago

bandel65 commented 2 years ago

Variable expansion does not work if there are punctuation characters immediately to either side of the {{variable}} reference. This makes it impossible to use {{variables}} at the end of sentence, for example. See attachment below.

Also, conditional syntax as described in the rendered documentation does not match actual conditional syntax appearing in test.md in the repo.

bugs.md

bandel65 commented 2 years ago

On further investigation, conditionals only work if there are blank lines preceding and following them, making it impossible for them to be used for inline text, e.g.


myFlag: true

::: {.if myFlag=true} This will work because it is stand-alone, surrounded by blank lines. :::

But if I want to do this, :::{.if myFlag=true} it's not going to work ::: as expected.

CDSoft commented 2 years ago

Thanks for the detailed report.

The first problem only affects variables defined in a yaml block. Variables in a meta block (lua code) are ok. I'll fix it.

The documentation is also not uptodate. I'll update the documentation.

bandel65 commented 2 years ago

Interesting! I’ll try the meta block as a workaround.

From: CDSoft @.> Sent: Thursday, November 4, 2021 2:42 AM To: CDSoft/panda @.> Cc: Bill Andel @.>; Author @.> Subject: [External] Re: [CDSoft/panda] Variables don't expand unless delimited by spaces (Issue #4)

Thanks for the detailed report.

The first problem only affects variables defined in a yaml block. Variables in a meta block (lua code) are ok. I'll fix it.

The documentation is also not uptodate. I'll update the documentation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CDSoft/panda/issues/4#issuecomment-960596892, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWKXBGJKOZLBCP2OHMOG26LUKJIPHANCNFSM5HJZF3ZQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

CDSoft commented 2 years ago

fixed. Variables defined in yaml or meta blocks should now behave the same way.