Skip to content

Commit

Permalink
points in sTeX problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazzpirate committed Oct 12, 2023
1 parent 6edb37f commit d6a2933
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,11 @@ trait SHTMLDocumentServer { this : STeXServer =>

override def onAdd: Unit = {
super.onAdd
plain.attributes((this.namespace, "data-problem-points")) = plain.attributes.getOrElse((HTMLParser.ns_shtml,"problempoints"),"0")
this.findAncestor {
case p: Problem => p
}.foreach { p =>
p.plain.attributes((this.namespace, "data-problem-points")) = plain.attributes.getOrElse((HTMLParser.ns_shtml, "problempoints"), "0")
}
}
}
case class ProblemMinutes(orig: HTMLNode) extends SHTMLNode(orig) {
Expand Down

0 comments on commit d6a2933

Please sign in to comment.