Hi, if the question is how to format then I use the three tildes on the line immediately before and after the block of code "~~~" eg. The following code block had the tildes fencing the code on the line immediately before and immediately after the block.
eg.
//Get PDF stream object previously saved
Set pdfStreamContainer =
etc
etc
//Get PDF stream object previously saved
Set pdfStreamContainer = ##Class(Ens.StreamContainer).%OpenId(context.StreamContainerID)
Try {
Set pdfStreamObj = pdfStreamContainer.StreamGet()
}
Catch {
$$$TRACE("Error opening stream object ID = "_context.StreamContainerID)
Quit
}
//Set PDF stream object into new OBX:5 segment
Set status = target.StoreFieldStreamBase64(pdfStreamObj,"OBX("_count_"):ObservationValue(1)")
Set ^testglobal("status",$H) = status
I note that the engine for the community website should automatically highlight known languages but you can override .
eg. On first line before "~~~javascript" or "~~~python"
var s = "JavaScript syntax highlighting";
alert(s);
s = "Python syntax highlighting"
print s
- Log in to post comments