-
Hi again, I've been diving into your code for ratio based layouts and found a few things that make my head spin. I hope you won't mind helping me clear the mist. Parsing for the
I went into Lpeg document and found:
You used lpeg.Cc(9), so this returns 9. So what is the meaning of The Thank you for your valuable time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Er. LPeg is hard and I am not always sure I got it right.
Does it make sense? |
Beta Was this translation helpful? Give feedback.
-
You are welcome! I'll probably tag a 2.0.1 release soon, so anything that can still make it in that milestone is great. I created an issue #39 to take into account the proposed clarifications on the offset. |
Beta Was this translation helpful? Give feedback.
Er. LPeg is hard and I am not always sure I got it right.
This being said, here, the "+" between the expressions being a "or" alternative, I want to parse:
division N r
--> n = N, ratio = r (explicit values for both, i.e. thews * number * ws * number
case),division N
--> n = N, ratio = nil (the one-number casews * number
; and this, later in the logic, means we will indeed use the page ratio (100%ph / 100%pw
) in that case),division
--> n = 9 (as a default), ratio = nil (i.e. thelpeg.Cc(9)
case; and same as above regarding it).Does it make sense?