Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting inside HTML tags #1

Open
s4y opened this issue Jan 19, 2011 · 3 comments
Open

Syntax highlighting inside HTML tags #1

s4y opened this issue Jan 19, 2011 · 3 comments
Labels

Comments

@s4y
Copy link

s4y commented Jan 19, 2011

First off, awesome project.

I've only been using it for a bit, but notice an issue with syntax highlighting inside HTML tags. Code like this:

<p[/* Lasso code here */]>Text text text</p>

…is highlighted with the color of HTML tags. Keywords, etc. are colored correctly, but variable names and other text is not.

@bfad
Copy link
Owner

bfad commented Jan 20, 2011

Your example of a comment works for me. As do both thread variables and local variables.

What seems to be colored the same as the HTML tags are those items which have no highlighting applied to them, such as member tags.

So, for example, if I have this:

<p [integer($thread_var->find('test')->get(#local_var)) + 5]">

everything that is usually specially highlighted is, and the following items, which would just be the default text color, are now the same color as the HTML tag:

  1. Every parenthesis
  2. The member tags "find" and "get"
  3. The number "5"

For me, the default text color is white. The text between the HTML tag is white, and instead of the "find", "get", and "5" being white inside the HTML tag, they're the same color as the HTML tag. I'm not sure this is a bad thing. I don't know if I would really want them to be white like the text inside my HTML tag. I think it might be better to let them be the default color of the HTML tag to indicate continuity / where you are with the code.

Is there some reason you would like to see them be the default color of plain text instead of the default color of the HTML tag when the code is placed there?

@s4y
Copy link
Author

s4y commented Jan 20, 2011

bfad, you're right — my example wasn't great. Here's a better one:

<form action="[Response_Path]?param=true">

Everything is the color of an HTML string. Syntax highlighting, for me, indicates how the document is divided — and in this case, it doesn't show where what is LassoScript and what is HTML.

@bfad
Copy link
Owner

bfad commented Jan 21, 2011

If I made [Response_Path] a keyword, it would get highlighted, but that wouldn't help for custom tags and types. I'll take a look at this and see what I can do.

bfad added a commit that referenced this issue Jul 3, 2011
Type keywords such as data, public, private, etc. added

Got rid of setting .foo shortcut as an internal variable but added #1

Added the word logical operators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants