preprocess
preprocess copied to clipboard
@else + @elseif directives
Any plans to add @else and @elseif directives?
else + 1
It would be nice to have @else
+1
+1
+1
+1. No else is killing me right now. Throw me an @else!
Here I am, guys! What's popping?
Throw me an @else and some @elseif dawg.
On Sat, Dec 5, 2015 at 3:42 AM, Simon Elsbrock [email protected] wrote:
Here I am, guys! What's popping?
Reply to this email directly or view it on GitHub: https://github.com/jsoverson/preprocess/issues/33#issuecomment-162175179
+1
+1
+1
+1
+1
+1. Hard to believe something so common and so simple is missing.
One of us should implement it. On Wed, Apr 27, 2016 at 4:40 PM Marcel Lamothe [email protected] wrote:
+1. Hard to believe something so common and so simple is missing.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jsoverson/preprocess/issues/33#issuecomment-215220969
+1
+1
I took a look at the code, and unfortunately it's not as easy as it should be: The reason is the pattern-matching relies on XRegExp.matchRecursive, which only works with tag pairs.
Anyway, I focused solely on the else-directive and came up with a solution. It passes basic tests as well as the existing ones, and nesting seems to work just fine. I'll commit and PR soon.
Nice one, @hu9o!