Open tabatkins opened 1 year ago
Is it any chance to add at least git tag of the laatest released verion? 🤔 According to https://pypi.org/project/railroad-diagrams/ latest version ois 3.0.1 however in git repo there is no any version tags. Please ..
Better late than never!
Version 3.0.0
Major version bump because I broke the Python API intentionally.
Some time ago the JS port made a distinction between outputting as standalone (XML SVG document) and "normal" (SVG in HTML). I never carried that over to the Python port, which meant that when I was using it in Bikeshed I was getting namespaces like an XML document injected into the HTML, which was causing validation failures.
Now the Python version carries the same distinction; see the README for details.
This also entailed changing the API around styling a little bit.
Diagram()
no longer takes acss
argument, and when you output normally, it doesn't include any CSS in the output. But when you callwriteStandalone()
, which formats it as an independent XML document, you can pass some CSS to include with it; if you don't, it includes the default CSS.If you're using the normal
.write()
to include a diagram in your HTML, you'll want to put the CSS into your document yourself now; you can get it from theDEFAULT_STYLE
property on the module.Version 3.0.1