Skip to content
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

manifestXmlJsonml doesn't work with numerical attributes #56

Closed
fugu13 opened this issue Mar 9, 2020 · 0 comments
Closed

manifestXmlJsonml doesn't work with numerical attributes #56

fugu13 opened this issue Mar 9, 2020 · 0 comments

Comments

@fugu13
Copy link
Contributor

fugu13 commented Mar 9, 2020

With the example from the standard library docs (reproduced below), manifestXmlJsonml fails with Cannot call manifestXmlJsonml on class ujson.Num.

The example:

std.manifestXmlJsonml([
  'svg', { height: 100, width: 100 },
  [
    'circle', {
      cx: 50, cy: 50, r: 40,
       stroke: 'black', 'stroke-width': 3,
       fill: 'red',
    }
  ],
])

Per the docs, the expected value is XML equivalent to:

<svg height="100" width="100">
  <circle cx="50" cy="50" fill="red" r="40"
  stroke="black" stroke-width="3"></circle>
</svg>

I've verified that's the return value in the jsonnet.org editable text areas.

lihaoyi-databricks added a commit that referenced this issue Jun 2, 2023
… handling of numbers in manifestXmlJsonml, handling of code in extCode (#171)

Fixes #110 and
#149 and
#74 and
#56 and
#47 and
#114 and
#76

Mostly straightforward changes, though the constructor signature of
`Interpeter` and `Evaluator` had to change a bit to satisfy the fixed
`extCode` semantics. Added unit tests to assert the correct behaviors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants