Is there a way to have a conditional block inside Marked
Could be really powerful and useful to me.
I am thinking something like the #ifdef structure with the C pre-processor of yore.
thanks
Amit
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 23 Aug, 2017 09:27 PM
Based on what conditions?
--
Brett Terpstra
2 Posted by Amit Agrawal on 23 Aug, 2017 10:22 PM
So, I was thinking that I have multiple resumes right now which I am targeting to different people and I would really like an ifdef type mechanism so I can say for example
#define EDUCATIONAL_PRODUCT
on top and then inside the markdown doc I can say
#ifdef EDUCATIONAL_PRODUCT
* Product manager for this awesome product
#endif
and then certain things will be included and not others.
Regards
Amit
PS: please dont post the above on the forum.
A
Support Staff 3 Posted by Brett on 24 Aug, 2017 02:26 PM
This is the kind of thing that you'd want to use a custom pre-processor for. A simple script that read in keys at the top and then removed parts conditionally would be pretty easy to set up. Pre-processors run before rendering, and it's designed to allow manipulation of the text before it reaches the Markdown processor.
http://marked2app.com/help/Custom_Processor.html#preprocessor
4 Posted by Amit Agrawal on 24 Aug, 2017 11:33 PM
Thank you. This will work well.
Regards
Amit