skanaar / nomnoml

The sassy UML diagram renderer
https://www.nomnoml.com
MIT License
2.66k stars 208 forks source link

Added html escaping of the text and a viewbox attribute to the svg export #70

Closed rikharink closed 6 years ago

rikharink commented 6 years ago

I've added html escaping of the text (using lodash escape) to support generics Class in the svg export. Before this broke the svg because of the angle brackets.

I've further added the viewbox attribute to support scaling of the svg by overriding the width and the height.

I've checked all the tests and they all still work except for the requirejs usecase, but that usecase also doesn't work (dagre can't be found) before my changes.

skanaar commented 6 years ago

Nice! I will look at this as soon I have time. I will remove requirejs support completely so no worries there.