Fix broken Emmet

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


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

BUG: 386151

Diff Detail

R39 KTextEditor
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
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

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

dhaumann added inline comments.Jan 5 2019, 10:07 AM

Being a js-noob, I did some searchin the net and it seems to me that \211 is supposed to be octal sequence. On 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
5434 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.