The best way to manage this in a general and PR friendly way would be to:
Add support for a custom marriageRenderer callback, this would take a "marriage node” along with the extra property and then do some printing of text or drawing. I would be fine with having a “default callback” that looks in the extra property and if it exists and is just a string, then it will be printed along the marriage line.
If might be a good idea to add some property in the marriage nodes when they are created that let you identify them in builder.js. That way you don’t have guess which nodes are “real” nodes, marriage nodes or other types of hidden nodes.
From an email, describing how to implement this: