tabatkins / railroad-diagrams

:steam_locomotive: A small JS+SVG library for drawing railroad syntax diagrams, like on JSON.org. Now with a Python port!
MIT License
1.66k stars 153 forks source link

RELEASE NOTES #99

Open tabatkins opened 1 year ago

tabatkins commented 1 year ago

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 a css argument, and when you output normally, it doesn't include any CSS in the output. But when you call writeStandalone(), 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 the DEFAULT_STYLE property on the module.

Version 3.0.1

kloczek commented 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 ..