Closed sarahkk closed 11 years ago
Have found another problem with this issue- it doesn't use variables at all and the numbers (inside the brackets) still display as 0.
Problem description: This is 2 + 6. Make 2 (1 + 3). Displays as : This is 2 + 6. Make 2 (0 + 0) When I add a space between the brackets and number, it displays fine.
Have put this problem into the same issues folder.
So -- the issue here is that brackets aren't automatically parsed by the btxe parser (because it can't yet pass them through to the tree structure they represent). But, because they are next to the number, the parser does see them as being a prefix or suffix to the number. Issue with that is that the prefix/suffix parser won't parse brackets because they are reserved as operator pair types.
Only realistic workaround is to manually declare these brackets as prefixes/suffixes (explicit/manual prefix/suffix markup isn't parsed, just displayed), and to set the b:on to no be interactive so it looks like it was parsed out of the text.
I've included an example of this in the referenced issue folder (see commit) and here:
<b:t>This is 2 + 6. Make 2</b:t><b:on number="1" notinteractive="yes" prefix="(" /><b:t> + </b:t><b:on number="3" notinteractive="yes" suffix=")" /><b:t>.</b:t>
This problem isn't just with brackets though- this is with letters like 's' after a number. Has that been fixed, so the only problem left now is to set the brackets to noninteractive?
Hi Sarah -- I couldn't reproduce the issue with the "s" -- the example in the the issues folder seems to work (it shows the 4 and the s), so i'd assumed the problem was with the brackets.
Can you confirm whether you are able to reproduce the original issue?
Hi Gareth,
I'm still able to reproduce the problem- any number with something right after it (without the gap) displays as 0 on screen (RP also found this problem- issue 1367). The example I've found so far have '%' and 's' after the number.
Will put the percent examples in the issues folder too.
Can you reproduce that with the example in the issues folder? I wasn't able to.
Can you add more examples to the issues folder (e.g. those screenshot-ed above)?
I've added 2 percentage problems to the issues folder, but I'll add a few more when I find them.
I have been able to reproduce with the example in the issues folder- that is the second screenshot. (743e_pdef_0)
Ah, I see why the 's' one was working for you. I was testing if it was a problem with the gap, and pushed that instead so it works. Will get rid of the gap. Can you see whether you can reproduce this now?
Have found this problem again - will put problems into issues folder. For these examples, a °C follows a dvar without a gap
5608a59d6797796ce9e11484fd1329d1/ pdef_ 6/7/8
Worth noting here that any required sufixes are currently manually declared... I could theoretically make it all letters & punctuation -- but would want to do that before a full test run. See #1429
$x keeps displaying as 0 even though in DVARS it is between 4 and 6. It even says that it has set x as 5 (see below), yet still comes out as 0 on screen. I tested this again with a space between {$x} and 's' and it displays with the correct number!
743e/pdef_0 (and a couple more in the same pipeline) have put problem in issues folder