Extending the idea of a diagram in a note the last line doesn't give an error but doesn't produce a diagram either.
@startuml
'!definelong OBJ { class Object {
' name : token
' name : flag
' }
'}
'!enddefinelong
!unquoted function OBJ()
class Object {
name : token
name : flag
}
!endfunction
component "C1" as C1 {
note "{{\nparticipant MyA as A\nA->>B: prepare\n}}\n" as detailsNote1
}
note "{{\nparticipant MyA as A\nA->>B: prepare\n}}\n" as detailsNote2
note "{{\nclass Object {\n name : token\n name : flag\n}\n}}\n" as detailsNote3
'note %invoke_void_func(OBJ()) as detailsNote4
@enduml