--- a/src/Pure/GUI/gui.scala Fri Dec 27 15:59:08 2024 +0100
+++ b/src/Pure/GUI/gui.scala Fri Dec 27 16:14:16 2024 +0100
@@ -84,6 +84,18 @@
override def make_bold(str: String): String = "<b>" + make_text(str) + "</b>"
override def spaces(n: Int): String = HTML.spaces(n)
+ def enclose_style(style: String, body: String): String =
+ if (style.isEmpty) enclose(body)
+ else {
+ Library.string_builder(style.length + body.length + 35) { s =>
+ s ++= "<html><span style=\""
+ s ++= style
+ s ++= "\">"
+ s ++= body
+ s ++= "</span></html>"
+ }
+ }
+
def bullet: String = "\u2218"
def bullet_triangle: String = "\u25b9"
}
--- a/src/Tools/jEdit/jedit_main/isabelle_sidekick.scala Fri Dec 27 15:59:08 2024 +0100
+++ b/src/Tools/jEdit/jedit_main/isabelle_sidekick.scala Fri Dec 27 16:14:16 2024 +0100
@@ -48,7 +48,7 @@
HTML.output(_name.substring(i + n))
case _ => HTML.output(_name)
}
- "<html><span style=\"" + css + "\">" + s + "</span></html>"
+ GUI.Style_HTML.enclose_style(css, s)
}
override def getLongString: String = _name
override def getName: String = _name