Changeset 30117 for documentation/trunk/php/gs-manual-export.php
- Timestamp:
- 2015-08-21T17:18:42+12:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/php/gs-manual-export.php
r27507 r30117 945 945 } 946 946 // - images start with an image caption 'element' 947 elseif (preg_match('/<imgcaption\s+figure_([a-z0-9_\-]+)\|(.+)> \s*<\/imgcaption>/', $line, $matches))947 elseif (preg_match('/<imgcaption\s+figure_([a-z0-9_\-]+)\|(.+)>([^<]*?)<\/imgcaption>/', $line, $matches)) 948 948 { 949 949 $figure_id = $matches[1]; 950 950 $figure_title = $matches[2]; 951 $image_content = $matches[3]; 951 952 // - watch for the special withLineNumber flag 952 953 $class_attribute = ''; … … 986 987 } 987 988 fwrite($xml_out, '</Title>' . "\n"); 988 $in_figure = true; 989 // Try and find the image itself 990 if (preg_match('/\{\{.+?[^:?]+\?\d+x\d+(&direct)?\}\}/', $image_content)) 991 { 992 processImage($xml_out, $line); 993 fwrite($xml_out, '</Figure>' . "\n"); 994 } 995 // Didn't find an image? Weird, but mark the imgcaption as open, and 996 // we'll chomp up the next image found as the content. 997 else 998 { 999 $in_figure = true; 1000 } 989 1001 // - record the id to prevent repeating 990 1002 $seen_ids[$figure_id] = true;
Note:
See TracChangeset
for help on using the changeset viewer.