editor creates mal-formed .js files

Bug #1915770 reported by jrv
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

start ebook-edit
file, create new empty book
give name and save in convenient directory
file, newfile, functions.js, ok

expected: empty file functions.js opens
actual: file opens with text

replace text with
  function aFunction() {
    console.log( 'in aFunction' );
close ebook-edit
open just-created .epub using ebook-edit
if not open at start, open functions.js in the editor pane by double clicking on file browser panel

expected: editor to open with contents
  function aFunction() {
    console.log( 'in aFunction' );
actual: editor opens with contents
  b"function aFunction() {\n console.log( 'in aFunction' );\n}"

It looks to me as though python string literals are put in the editor rather than the eval of those python string literals

calibre version: 5.10.1
OS: linux bullseye/testing

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers