-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example.html has bit-rotted #97
Comments
I have a version that works, but IMHO, it's ugly. The inability to run a My changes entail adding <h1>IDENT</h1>
<div id='ident'>
<script type=module>
ComplexDiagram(
Choice(0, Skip(), '-'),
Choice(0, NonTerminal('name-start char'), NonTerminal('escape')),
ZeroOrMore(
Choice(0, NonTerminal('name char'), NonTerminal('escape')))).addTo(document.getElementById('ident'));
</script>
</div> All that said, I can submit a PR if that's an acceptable result. |
:) that is a bit hideous. But something is better than nothing, so I would encourage you to do it. Thanks! |
After some more thought, I realized I could monkey-patch Diagram.addTo(), and bury the ugliness where nobody will see it when they're looking at the browser results (as opposed to the contents of the <h1 id='ident'>IDENT</h1>
<div>
<script type=module>
ComplexDiagram(
Choice(0, Skip(), '-'),
Choice(0, NonTerminal('name-start char'), NonTerminal('escape')),
ZeroOrMore(
Choice(0, NonTerminal('name char'), NonTerminal('escape')))).addTo();
</script>
</div> I'll submit a PR, and let @tabatkins can decide if it's too ugly to accept. It won't break my heart either way :-) |
Hi - it looks like when you retired the non-modular version of
railroad-diagram.js
in Jan 2022, it broke theexample.html
file (last updated in Feb 2018). It would be great to have that file updated. The immediate issue is that it refers to the retired versions rather than the current versions. But it also needs to be adapted to import the module appropriately.FYI we are using it in our our project work at https://github.com/GetPoplog/Grammar
Steve
The text was updated successfully, but these errors were encountered: