From d60489f717649db75549c9eb6d4c9c6312c03928 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 11 Jul 2017 14:30:58 -0400 Subject: [PATCH] Fix problem reported by Alex at https://github.com/openwebwork/pg/commit/4973307a4e7c50b6e4f1afdc6f2c44433f7e6f8f#commitcomment-23035223. --- macros/PGML.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/PGML.pl b/macros/PGML.pl index 87ddb36d14..d773fcdbd1 100644 --- a/macros/PGML.pl +++ b/macros/PGML.pl @@ -732,8 +732,8 @@ sub combineTopItems { my $id = $top->{combine}{$prev->{type}}; my $value; my $inside = 0; if ($id) { if (ref($id) eq 'HASH') {($id,$value) = %$id; $inside = 1} else {$value = $prev->{$id}} - my $topList = substr(($top->topItem || {})->{token} || '',0,2); - my $prevList = substr(($prev->topItem || {})->{token} || '',0,2); + my $topList = (Value::isa($top,'PGML::Block') ? substr(($top->topItem || {})->{token} || '',0,2) : ''); + my $prevList = (Value::isa($prev,'PGML::Block') ? substr(($prev->topItem || {})->{token} || '',0,2) : ''); if ( $top->{$id} eq $value || ($top->{type} eq 'list' && $top->{bullet} eq 'roman' &&