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

Comments inline with properties breaks css.c parser #2

Closed
wesbaker opened this issue Feb 21, 2011 · 9 comments
Closed

Comments inline with properties breaks css.c parser #2

wesbaker opened this issue Feb 21, 2011 · 9 comments

Comments

@wesbaker
Copy link

When there's a comment inline with a property nothing after that selector and property is parsed into tags. For example, try this:

border: 1px solid #b7c7d2; /* won't work with rounded corners, but looks best for non js */

Any ideas on how to fix it?

Thanks,
Wes

@fishman
Copy link
Contributor

fishman commented Sep 27, 2011

sorry i didn't actually see this error before is this still relevant?

vhda pushed a commit to vhda/ctags that referenced this issue May 5, 2014
Add support for C++11 type alias with using keyword
@masatake masatake mentioned this issue May 7, 2014
@blueyed
Copy link
Contributor

blueyed commented Sep 17, 2014

@wesbaker
Can you provide more information, e.g. a sample CSS file, please?
Only in case this is still an issue, of course.

@wesbaker
Copy link
Author

I'm no longer using ctags, so I'm not sure if it's an issue anymore.

@masatake masatake reopened this Sep 18, 2014
@masatake
Copy link
Member

Single quote in a comment triggers this bug.

foo.css
a {x: 0; /'/}
b {y: 0;}

With this input ctags generates:

a /tmp/foo.css /^a {x: 0; /'/}$/;" s

Only a is tagged.

bar.css, no single quote in the comment:

a {x: 0; /**/}
b {y: 0;}

ctags generates good tags for this input:

a /tmp/foo.css /^a {x: 0; /**/}$/;" s
b /tmp/foo.css /^b {y: 0;}$/;" s

Both a and b are tagged.

A pull request is welcome :-P
Happy hakcing!

@masatake
Copy link
Member

I found the parser doesn't handle nested state like a { /**/ }, a comment in a definition.
Managing in-comment state and other states or state stack may be needed.
Amount of work is needed.

@masatake
Copy link
Member

masatake commented Oct 4, 2014

I add this as a test case named css-singlequote-in-comment-issue2.b.
So we can debug any time you want.

@masatake
Copy link
Member

https://github.com/geany/geany/blob/master/tagmanager/ctags/nestlevel.h may be useful to deal with nested state.

@ffes
Copy link
Member

ffes commented Nov 11, 2014

@b4n Can this be closed after the changes of yesterday?

@b4n
Copy link
Member

b4n commented Nov 12, 2014

Fixed in dd86469

@b4n b4n closed this as completed Nov 12, 2014
dtikhonov pushed a commit that referenced this issue Nov 14, 2014
Get latest fishman changes
masatake pushed a commit that referenced this issue Mar 13, 2016
…g-anon-name

C++: use vStringCopyS to create an anonymous identifier
k-takata added a commit to k-takata/ctags that referenced this issue Feb 28, 2020
8fad6d2f Merge pull request universal-ctags#2 from k-takata/use-priuptr
42c94176 Use PRIuPTR instead of SIZE_T_FMT_CHAR

git-subtree-dir: misc/packcc
git-subtree-split: 8fad6d2ff95c25fbe5de293275aded57d4965d30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants