Bug #25507

Wrong syntax highlighting in wrong context

Added by Oliver Hader about 12 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Administrator Admin
Category:
t3editor
Target version:
-
Start date:
2007-11-26
Due date:
% Done:

0%

TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Examples of code snippets tested:
10.value = My.TEXT.file.txt
5.file = EXT:whatever/res/header.jpg

In these examples the "TEXT" and "header" words get highlighted but shouldn't because they are used in string context and not as TypoScript keywords/properties.

(issue imported from #M6834)

History

#1 Updated by Steffen Kamper about 12 years ago

this is hardcore test for highlight :-)

maybe you can define the rule
  • only highlight Object Keyword after ={space} or =

#2 Updated by Administrator Admin almost 12 years ago

this is really hard to implement!

in the current version the editor just searches for keywords and colored them. there is no deeper logic implemented.
I think sweeTS and other have the same issue.

Perhaps we can implement something later.
i leave this issue as "new" as a reminder for later.

#3 Updated by Administrator Admin almost 12 years ago

the template analyser solves this in an easy way

Everything behind a = or < is interpreted as "value" or "copy value"

this also saves some time on parsing/coloring because the editor don't need to search for reserved words in "value"s

it's easy to implement. patch will follow real soon!

#4 Updated by Administrator Admin almost 12 years ago

i already have a patch in process

#5 Updated by Administrator Admin almost 12 years ago

The highlighting is now more aligned to the known "Template Analyser". So highlighted keyword behind a "=" or "<" should be no problem anymore.
I also adjust the colors a little bit.

#6 Updated by Michael Stucki almost 6 years ago

  • Project changed from t3editor to TYPO3 Core
  • Target version deleted (0)

#7 Updated by Michael Stucki almost 6 years ago

  • Category set to t3editor

Also available in: Atom PDF