[ww-bugs] Bug 3409: New: empty strings in PGML substitutions

bugzilla-daemon at webwork.maa.org bugzilla-daemon at webwork.maa.org
Tue Sep 1 16:27:09 EDT 2015


http://bugs.webwork.maa.org/show_bug.cgi?id=3409

           Summary: empty strings in PGML substitutions
           Product: PG
           Version: develop
          Platform: Macintosh
        OS/Version: Mac OS
            Status: NEW
          Severity: minor
          Priority: P5
         Component: macros
        AssignedTo: gage at math.rochester.edu
        ReportedBy: alex.jordan at pcc.edu
        Web browser Firefox
           version:
    Browser version 40.0.3
            number:


I thought I had already submitted this, but I can't find a notification, nor
can I find it via searching Bugzilla. So possibly for the second time:

An empty string in the form of two adjacent quote characters breaks the PGML
parsing somehow in [@...@]. This would never come up in direct PG authoring,
but our MathBook XML project writes pg files in an automated way, and sometimes
an empty strings show up.

I've gotten around it for now doing something like what is in the second
example below, but it's ugly.

DOCUMENT();      
loadMacros('PGbasicmacros.pl','PGML.pl');
$empty_string = '';

BEGIN_PGML
This works: [@$empty_string.'Hello'@]

This works: [@"$empty_string".'Hello'@]

This does not: [@''.'Hello'@]

This does not: [@"".'Hello'@]

END_PGML
ENDDOCUMENT();

-- 
Configure bugmail: http://bugs.webwork.maa.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the webwork-bugs mailing list