Giter VIP home page Giter VIP logo

Comments (12)

viebel avatar viebel commented on August 23, 2024

Nice catch @Lucas-C !

Did you find other inconsistencies?

On Sun, 2 Oct 2016 at 17:15 Lucas Cimon [email protected] wrote:

I used a very basic setup, and tested with Chrome:

1/0
<script> window.klipse_settings = {selector_eval_js: '.klipse'}; </script> <script src="/libs/js/klipse_plugin.min.js"></script>

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#122, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA6VPvXP9fxqJrZf48RDJTrA78qaDkTEks5qv7yVgaJpZM4KMBRT
.

from klipse.

viebel avatar viebel commented on August 23, 2024

@Lucas-C the root cause is that Infinity is not part of JSON and currently KLIPSE uses JSON.stringify to stringify the result of eval.

I found a library that pretty print javascript without using JSON.stringify:
https://github.com/cvadillo/js-object-pretty-print

Integrating this lib into KLIPSE will solve the issue.

from klipse.

Lucas-C avatar Lucas-C commented on August 23, 2024

Thank you !

from klipse.

viebel avatar viebel commented on August 23, 2024

This issue is going to be fixed by #149
By the way the same problem occured with ES6 Symbols

from klipse.

viebel avatar viebel commented on August 23, 2024

It is fixed! Can you please double check @Lucas-C ?

from klipse.

Lucas-C avatar Lucas-C commented on August 23, 2024

The original bug seems fixed, but now there is a "klipse-container-0" string by default in the 2nd .CodeMirror block :

screenshot from 2017-01-18 22-54-48

from klipse.

Lucas-C avatar Lucas-C commented on August 23, 2024

Any idea on where that is coming from ??

from klipse.

viebel avatar viebel commented on August 23, 2024

Yeah. It's the id of the container associated with the the snippet. Try to type

document.getElementById("klipse-container-0").innerHTML = 
 "<div style='color:blue;'> Hello <b>World</b>!</div>"

You can prevent it by setting data-async-code="true"

from klipse.

Lucas-C avatar Lucas-C commented on August 23, 2024

I could not make it work properly:

  • data-async-code simply broke the code evaluation
  • there is and HTML element with ID "klipse-container-0" but it is not the one that contains the text I see

Hence I decided to revert using v0.7.0 : https://lucas-c.github.io/progWorkshop-bootstrapPage/workshop_material/challenges/3.html

from klipse.

viebel avatar viebel commented on August 23, 2024

I see. Indeed it's a bug inside KLIPSE.
Could you open a separate issue please?
(Trรจs sympa ton site!!!)

from klipse.

viebel avatar viebel commented on August 23, 2024

from klipse.

Lucas-C avatar Lucas-C commented on August 23, 2024

Thanks
(merci!)

from klipse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.