Closed bandel65 closed 9 months ago
Conditionals are only implemented for blocks (i.e. separate paragraphs). I guess this could be done for Span inlines too. The syntax for pandoc should be something like this:
Here is some text and... [This should appear because myFlag is set to true.]{.if myFlag=true} Oh, and more text.
or
Here is some text and...
[This should appear because myFlag is set to true.]{.if myFlag=true}
Oh, and more text.
It’d be really useful. For example:
The test was run on {{date}} at {{site}}. The test [passed.]{.if testPassed=true} [failed.]{.if testPassed=false}
Sure, you could do that with blocks, but then you’re repeating the entire paragraph. And I’m really lazy. ;-)
From: CDSoft @.> Sent: Friday, November 5, 2021 10:30 AM To: CDSoft/panda @.> Cc: Bill Andel @.>; Author @.> Subject: [External] Re: [CDSoft/panda] Conditionals only work when in separate paragraphs. (Issue #8)
Conditionals are only implemented for Div blocks (i.e. separate paragraphs). I guess this could be done for Span inlines too. The syntax for pandoc should be something like this:
Here is some text and... [This should appear because myFlag is set to true.]{.if myFlag=true} Oh, and more text.
or
Here is some text and...
[This should appear because myFlag is set to true.]{.if myFlag=true}
Oh, and more text.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CDSoft/panda/issues/8#issuecomment-962082505, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWKXBGNEPO4N6YI45JAZALLUKQIBHANCNFSM5HMOOWHQ. 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.
Done.
This works:
It renders as:
...but, this does not - it renders the block as plain text:
It renders as:
This greatly diminishes the utility of conditionals.