Closed screendriver closed 9 years ago
Could you add version of Atom Preview (for the record)? Thanks.
Of course: 0.13.4
Thank you.
I have no ETA when I'll be able to find time to investigate this. I hope to resolve this ASAP. Maybe this weekend?
There's no hurry for that :wink:
I'm also experiencing this bug, and I'm getting this error in the console:
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'"
in the file ~/.atom/packages/preview/node_modules/jade/node_modules/constantinople/node_modules/acorn-globals/node_modules/acorn/acorn.js
at line 508 in the makePredicate function.
My window gives the standard "Please type in a Text Editor to render preview", then changes to a blank-looking window with horizontal and vertical scrollbars. The scrollbar seems to be of the right proportions for the compiled JS.
Selecting and copying the text (Select-All, Copy) does copy the JS, but no text shows.
It is NOT limited to Coffeescript in my case, Jade files also compile to HTML fine, but do not show.
This is in Windows 7, Atom 0.186
+1
+1
I am working on this right now. I am able to reproduce. Thank you all for your patients.
Looks like they have switched off of the TextEditorView and onto using atom-text-editor
elements. See https://github.com/atom/atom/issues/5503 for discussion about using it in packages.
This looks like it will be a big change. It may take some time.. it is unfortunate that Atom changes so drastically and so often. It is difficult to keep up.
Published patch to v0.13.5
Please let me know if it works for you.
dude. nice work. thanks for getting this done so fast.
Works great now. Thanks!
CoffeeScript is now rendering - which is the realy need, thanks!
I got a possibly unrelated error with a Jade file:
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
Previewing Failed…
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
at Function (native)
at makePredicate (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\node_modules\constantinople\node_modules\acorn-globals\node_modules\acorn\acorn.js:508:12)
at C:\Users\-snip-\.atom\packages\preview\node_modules\jade\node_modules\constantinople\node_modules\acorn-globals\node_modules\acorn\acorn.js:513:25
at exports.version (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\node_modules\constantinople\node_modules\acorn-globals\node_modules\acorn\acorn.js:25:71)
at Object.<anonymous> (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\node_modules\constantinople\node_modules\acorn-globals\node_modules\acorn\acorn.js:28:3)
at Module._compile (module.js:475:26)
at Object.loadFile [as .js] (D:\programs\atom\app-0.187.0\resources\app\src\babel.js:162:21)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at require (module.js:399:17)
at Object.<anonymous> (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\node_modules\constantinople\node_modules\acorn-globals\index.js:3:13)
at Module._compile (module.js:475:26)
at Object.loadFile [as .js] (D:\programs\atom\app-0.187.0\resources\app\src\babel.js:162:21)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at require (module.js:399:17)
at Object.<anonymous> (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\node_modules\constantinople\index.js:3:14)
at Module._compile (module.js:475:26)
at Object.loadFile [as .js] (D:\programs\atom\app-0.187.0\resources\app\src\babel.js:162:21)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at require (module.js:399:17)
at Object.<anonymous> (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\lib\parser.js:8:22)
at Module._compile (module.js:475:26)
at Object.loadFile [as .js] (D:\programs\atom\app-0.187.0\resources\app\src\babel.js:162:21)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at require (module.js:399:17)
at Object.<anonymous> (C:\Users\-snip-\.atom\packages\preview\node_modules\jade\lib\index.js:13:14)
at Module._compile (module.js:475:26)
at Object.loadFile [as .js] (D:\programs\atom\app-0.187.0\resources\app\src\babel.js:162:21)
at Module.load (module.js:370:32)
at Function.Module._load (module.js:325:12)
at Module.require (module.js:380:17)
at require (module.js:399:17)
at Object.module.exports.grammars.Jade.render (C:\Users\-snip-\.atom\packages\preview\lib\renderer.coffee:95:16)
at atom-preview-editor.PreviewView.renderPreviewWithRenderer (C:\Users\-snip-\.atom\packages\preview\lib\preview-view.coffee:347:27)
at atom-preview-editor.PreviewView.renderPreview (C:\Users\-snip-\.atom\packages\preview\lib\preview-view.coffee:229:6)
at later (C:\Users\-snip-\.atom\packages\preview\node_modules\underscore-plus\node_modules\underscore\underscore.js:724:25)
@PyroSA could you please create a separate issue for that one? It's Jade specific, and I think I know what it is, too. :+1:
Submitted issue #90
Thanks @PyroSA. I'll take a look.
Also is anyone experiencing issue where it does not refresh on file contents change? Tab change is working though.
Published patch to v0.13.6
Since one of the last updates of Atom it is not working anymore with my CoffeScripts. The "untitled preview" tab remains empty. Mac OS X 10.10.2 + Atom 0.186.0