Coder Social home page Coder Social logo

Comments (8)

jesseweed avatar jesseweed commented on August 16, 2024

I don't write C++ so haven't been able to validate, but I have checked several other languages and can't seem to repro the bug. Are you still seeing this issue?

from seti-syntax.

0xShammah avatar 0xShammah commented on August 16, 2024

Yes, I have updated the theme to the latest version and am using Atom v0.119. The issue is still there, and it happens even on a clean Atom installation with the theme. It also happens only with this theme.

from seti-syntax.

SeriousM avatar SeriousM commented on August 16, 2024

@Shammah - maybe you post a gist of your wrong-highlighted code?

from seti-syntax.

0xShammah avatar 0xShammah commented on August 16, 2024

Well, the image really shows what goes wrong already.
The gist was made anyway, and can be found at https://gist.github.com/Shammah/4ba82a272069b84366c8

from seti-syntax.

Pyr0x1 avatar Pyr0x1 commented on August 16, 2024

Same problem here, I noticed it happens only with built-in functions or statements, like "if", "for", "printf", "free", etc... and only if you leave a space before the parenthesis. Maybe this could be of some help.

from seti-syntax.

sir-mulan avatar sir-mulan commented on August 16, 2024

Any progress on this? The issue is still present.

I am not familiar with this modern websy stuff but it might be helpful to point out that according to the dev tools, when the bracket is white (therefore right after the keyword – if in this case), it's a plain character inside class="meta block c" while if it's blue (there is a space before it), the space and the bracket are additionally inside class="meta initialization c" and the bracket itself additionally inside class="punctuation definition parameters c".

I don't know which one is responsible for the colour but it shouldn't be that hard to make an exception, right?

EDIT: It's .punctuation.definition.parameters. Now let's figure out how to fix it.

Lines 296–302 in index.less:

// QUOTES
&.string,
&.variable,
&.parameters,
&.array {
  color: @string;
}

It's just a logical assumption, but a dirty fix could be something like &.parameters.c {color: @code-font-color;}, right? However, is this not an issue with the parser given that the classes of the same character differ depending on the space?

from seti-syntax.

jameslzhu avatar jameslzhu commented on August 16, 2024

I managed to track down the exact problem. I've submitted a pull request to the language-c repo here:
atom/language-c#62

tl;dr it's a stray question mark causing the pattern ( to be matched (whitespace and parenthesis).

from seti-syntax.

sir-mulan avatar sir-mulan commented on August 16, 2024

@jzhu98 Well done, I've glanced over some files and it doesn't appear to break anything. Also fixes the same issue in Sublime. Thanks!

from seti-syntax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.