Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Clean up broken image icon

AuthorDaveJarvis <email>
Date2020-09-13 14:56:33 GMT-0700
Commit2b19f30cd7c4cab5f55c28cc637e53f01c165cb4
Parent784f5c2
src/main/java/com/scrivenvar/preview/SvgRasterizer.java
*/
public static final String BROKEN_IMAGE_SVG =
- "<svg height='19pt' viewBox='0 0 25 19' " +
- "width='25pt' xmlns='http://www.w3.org/2000/svg'><g " +
- "fill='#454545'><path d='m8.042969 11.085938c.332031 1.445312 1" +
- ".660156 2.503906 3.214843 2.558593zm0 0'/><path d='m6.792969 9" +
- ".621094-.300781.226562.242187.195313c.015625-.144531.03125-.28125" +
- ".058594-.421875zm0 0'/><path d='m10.597656.949219-2.511718" +
- ".207031c-" +
- ".777344.066406-1.429688.582031-1.636719 1.292969l-.367188 1" +
- ".253906-3" +
- ".414062.28125c-1.027344.085937-1.792969.949219-1.699219 1.925781l" +
- ".976562 10.621094c.089844.976562.996094 1.699219 2.023438 1" +
- ".613281l11.710938-.972656-3.117188-2.484375c-.246094.0625-.5" +
- ".109375-" +
- ".765625.132812-2.566406.210938-4.835937-1.597656-5.0625-4.039062-" +
- ".023437-.25-.019531-.496094 0-.738281l-.242187-.195313.300781-" +
- ".226562c.359375-1.929688 2.039062-3.472656 4.191406-3.652344" +
- ".207031-" +
- ".015625.414063-.015625.617187-.007812l.933594-.707032zm0 0'/><path" +
- " " +
- "d='m10.234375 11.070312 2.964844 2.820313c.144531.015625.285156" +
- ".027344.433593.027344 1.890626 0 3.429688-1.460938 3.429688-3" +
- ".257813" +
- " 0-1.792968-1.539062-3.257812-3.429688-3.257812-1.890624 0-3" +
- ".429687 " +
- "1.464844-3.429687 3.257812 0 .140625.011719.277344.03125.410156zm0" +
- " " +
- "0'/><path d='m14.488281.808594 1.117188 4.554687-1.042969.546875c2" +
- ".25.476563 3.84375 2.472656 3.636719 4.714844-.199219 2.191406-2" +
- ".050781 3.871094-4.285157 4.039062l2.609376 2.957032 4.4375" +
- ".371094c1" +
- ".03125.085937 1.9375-.640626 2.027343-1.617188l.976563-10.617188c" +
- ".089844-.980468-.667969-1.839843-1.699219-1.925781l-3.414063-" +
- ".285156-.371093-1.253906c-.207031-.710938-.859375-1.226563-1" +
- ".636719-1.289063zm0 0'/></g></svg>";
+ "<svg height='19pt' viewBox='0 0 25 19' width='25pt' xmlns='http://www" +
+ ".w3.org/2000/svg'><g fill='#454545'><path d='m8.042969 11.085938c" +
+ ".332031 1.445312 1.660156 2.503906 3.214843 2.558593zm0 0'/><path " +
+ "d='m6.792969 9.621094-.300781.226562.242187.195313c.015625-.144531" +
+ ".03125-.28125.058594-.421875zm0 0'/><path d='m10.597656.949219-2" +
+ ".511718.207031c-.777344.066406-1.429688.582031-1.636719 1.292969l-" +
+ ".367188 1.253906-3.414062.28125c-1.027344.085937-1.792969.949219-1" +
+ ".699219 1.925781l.976562 10.621094c.089844.976562.996094 1.699219 " +
+ "2.023438 1.613281l11.710938-.972656-3.117188-2.484375c-.246094" +
+ ".0625-.5.109375-.765625.132812-2.566406.210938-4.835937-1.597656-5" +
+ ".0625-4.039062-.023437-.25-.019531-.496094 0-.738281l-.242187-" +
+ ".195313.300781-.226562c.359375-1.929688 2.039062-3.472656 4" +
+ ".191406-3.652344.207031-.015625.414063-.015625.617187-.007812l" +
+ ".933594-.707032zm0 0'/><path d='m10.234375 11.070312 2.964844 2" +
+ ".820313c.144531.015625.285156.027344.433593.027344 1.890626 0 3" +
+ ".429688-1.460938 3.429688-3.257813 0-1.792968-1.539062-3.257812-3" +
+ ".429688-3.257812-1.890624 0-3.429687 1.464844-3.429687 3.257812 0 " +
+ ".140625.011719.277344.03125.410156zm0 0'/><path d='m14.488281" +
+ ".808594 1.117188 4.554687-1.042969.546875c2.25.476563 3.84375 2" +
+ ".472656 3.636719 4.714844-.199219 2.191406-2.050781 3.871094-4" +
+ ".285157 4.039062l2.609376 2.957032 4.4375.371094c1.03125.085937 1" +
+ ".9375-.640626 2.027343-1.617188l.976563-10.617188c.089844-.980468-" +
+ ".667969-1.839843-1.699219-1.925781l-3.414063-.285156-.371093-1" +
+ ".253906c-.207031-.710938-.859375-1.226563-1.636719-1.289063zm0 " +
+ "0'/></g></svg>";
static {
src/main/java/com/scrivenvar/preview/SvgReplacedElementFactory.java
/**
+ * TeX expression wrapped in a {@code <tex>} element.
+ */
+ private static final String HTML_TEX = "tex";
+
+ /**
* The {@code <svg>} element attribute name containing a value that uniquely
* identifies the vector graphic file. This value must always be the same for
}
}
- else if( HTML_SVG.equals( nodeName ) ) {
+ else if( HTML_TEX.equals(nodeName)) {
// Convert the <svg> element to a raster graphic if it isn't cached.
final var src = e.getAttribute( SVG_IMAGE_SRC );
Delta31 lines added, 35 lines removed, 4-line decrease