|
From: <var...@us...> - 2021-06-21 15:07:07
|
Revision: 10309
http://sourceforge.net/p/phpwiki/code/10309
Author: vargenau
Date: 2021-06-21 15:07:05 +0000 (Mon, 21 Jun 2021)
Log Message:
-----------
lib/plugin/TeX2png.php: better error messages
Modified Paths:
--------------
trunk/lib/plugin/TeX2png.php
Modified: trunk/lib/plugin/TeX2png.php
===================================================================
--- trunk/lib/plugin/TeX2png.php 2021-06-21 14:12:30 UTC (rev 10308)
+++ trunk/lib/plugin/TeX2png.php 2021-06-21 15:07:05 UTC (rev 10309)
@@ -191,8 +191,8 @@
// or mathematical expression is wrong
switch ($this->isMathExp($text)) {
case 0: // not a mathematical expression
- $html = HTML::samp(array('class' => 'tex',
- 'style' => 'color:red;'), $text);
+ $html = HTML::span(array('class' => 'error'),
+ fmt("Not a mathematical expression: “%s”", $text));
break;
case 1: // an inlined mathematical expression
$html = HTML::img(array('class' => 'tex',
@@ -247,9 +247,11 @@
} else {
// we don't have png and/or gd.
$error_html = _("Sorry, this version of PHP cannot create PNG image files.");
- $link = "https://www.php.net/manual/en/ref.image.php";
- $error_html .= sprintf(_("See %s"), $link) . ".";
- return HTML::p(array('class' => 'error'), $error_html);
+ $error_html .= " ";
+ $error_html .= _("See") . _(": ");
+ $link = HTML::a(array('href' => "https://www.php.net/manual/en/ref.image.php"),
+ "https://www.php.net/manual/en/ref.image.php") ;
+ return HTML::span(array('class' => 'error'), $error_html, $link);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|