https://bugs.kde.org/show_bug.cgi?id=504749

            Bug ID: 504749
           Summary: "<" counts as start of tag, so colours following text,
                    regardless of the text that follows
    Classification: Applications
           Product: lokalize
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: editor
          Assignee: sdepi...@gmail.com
          Reporter: fi...@tutanota.com
                CC: aa...@kde.org, sha...@ukr.net
  Target Milestone: ---

Created attachment 181718
  --> https://bugs.kde.org/attachment.cgi?id=181718&action=edit
Lokalize editor window showing translation source and target, with a <=
incorrectly marked as the start of a tag, and all text following that coloured
as a tag

I realise this is not an easy task to fix, but we have (html, etc) tag
colouring in the editor panes in Lokalize. The "<" character counts as the
beginning of a tag.

However it is also a valid char in normal text you might translate (example
situation included here). In these cases text can be coloured as a tag without
it being a real or valid tag.

One way to fix this being more clever with the string parsing: after < there
(very probably) should only ever be a char matching [a-zA-Z] so for example <
em > is not a valid html tag while <em> is. We also could look at giving up on
marking a section of the string as a tag if we have a < and > mismatch i.e.
walk the string looking for the matching > tag, if it's not found by the end of
the string, or another < is found, reject that first < and don't colour it as
tag.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to