editor creates mal-formed .js files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
start ebook-edit
file, create new empty book
epub
give name and save in convenient directory
file, newfile, functions.js, ok
expected: empty file functions.js opens
actual: file opens with text
b''
replace text with
function aFunction() {
console.log( 'in aFunction' );
}
save
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
Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.
status fixreleased