Modify

Opened 3 months ago

Last modified 10 days ago

#18893 assigned enhancement

[Patch] OpeningHourTest highlight erroneous part in string

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.06
Component: Core validator Version:
Keywords: opening_hours highlight Cc: skyper, SimonPoole

Description

ticket:18892, skyper:

The messages should display the string with highlighted errors instead of the line and column
In JS, the messages displayed the string from the start to the position the error occurred but that does not work for multiple errors. See #18807

Attachments (2)

18893.patch (7.2 KB) - added by simon04 3 months ago.
2020-03-08-192958_783x158_scrot.png (9.1 KB) - added by simon04 3 months ago.

Download all attachments as: .zip

Change History (9)

Changed 3 months ago by simon04

Attachment: 18893.patch added

Changed 3 months ago by simon04

comment:1 Changed 3 months ago by simon04

Cc: SimonPoole added
Keywords: highlight added

Here's a draft, attachment:18893.patch

opening_hours=10:00-17:00; Jan-Mai,Nov-Dec Mo off; PH,SH Mo 09:00-17:00
opening_hours=Mo-Fr 7-19
opening_hours=Su,PH 10:00-12:00


However, the highlighting is off by one token.

@SimonPoole, maybe we shouldn't be using token.next when creating a OpeningHoursParseException in OpeningHoursParser.jj, but just token?

Last edited 3 months ago by simon04 (previous) (diff)

comment:2 Changed 3 months ago by skyper

Nice, but only highlight to the next separator e.g. space, comma or semi-colon.

comment:3 Changed 3 months ago by simon04

Milestone: 20.0320.04

comment:4 Changed 6 weeks ago by simon04

Milestone: 20.0420.05

comment:5 Changed 3 weeks ago by Klumbumbus

Milestone: 20.0520.05old

Milestone renamed

comment:6 Changed 3 weeks ago by Klumbumbus

Milestone: 20.05old20.05

comment:7 Changed 10 days ago by simon04

Milestone: 20.0520.06

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain simon04.
as The resolution will be set.
to The owner will be changed from simon04 to the specified user.
The owner will change to simon04
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.