Fix broken Emmet
ClosedPublic

Authored by loh.tar on Jan 4 2019, 8:22 PM.

Details

Reviewers
dhaumann
Group Reviewers
KTextEditor
Commits
R39:120e8400cad6: Fix broken Emmet
Summary
  • Improve warning message with line number

BUG: 386151

Diff Detail

Repository
R39 KTextEditor
Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Jan 4 2019, 8:22 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJan 4 2019, 8:22 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Jan 4 2019, 8:22 PM

Well, if it is fixed I can't say. At least the error is gone and "Increment/Decrement" works.
May some guru investigate if its fixed. Obviously is there a problem with these string constants.

dhaumann accepted this revision.Jan 5 2019, 9:30 AM
dhaumann added subscribers: carewolf, dhaumann.

@carewolf This issue was caused by the QtScript to QML migration in KTextEditor. Could you have a look or pass this on the relevant V4 developers to investigate whether this is possibly a bug in V4?

This revision is now accepted and ready to land.Jan 5 2019, 9:30 AM
This revision was automatically updated to reflect the committed changes.

Btw, I committed this, but now the length of the string is 14 characters instead of 8, so this patch is certainly wrong. But better this than a completely broken emmet.

carewolf added inline comments.Jan 5 2019, 9:55 AM
src/script/data/libraries/emmet/lib.js
5434

Is that even valid JS? Shouldn\t it be \xHH with hexidecimal?

dhaumann added inline comments.Jan 5 2019, 10:07 AM
src/script/data/libraries/emmet/lib.js
5434

Being a js-noob, I did some searchin the net and it seems to me that \211 is supposed to be octal sequence. On https://stackoverflow.com/questions/21071921 it is said that octal sequences are optional in the standard... But indeed I assume this should work.

dhaumann added inline comments.Jan 5 2019, 10:54 AM
src/script/data/libraries/emmet/lib.js
5434

https://mathiasbynens.be/notes/javascript-escapes might also be interesting for more background. Maybe the octal notation was deprecated as well... So best would be to fix emmet upstream.

May I ask a stupid question? Is the entire function needed? That's looks to me somehow like image/picture stuff but I don't find picture stuff in the Tool->Emmet menu.