Closed masatake closed 1 year ago
Just a short note, we are about to leave for Prague 😉
CSS can give tags with spaces as well. When the CSS parser was updates by @b4n a while ago (don't have time to git blame right now, sorry) we discussed that as well. Don't remember the exact outcome of that discussion.
@ffes, thank you. I will search the outcome.
I found it in #119. The outcome is that we just accept spaces. So I will update docs/format.rst. I also add an assertion that tags should not contain tabs. I will make a PR for this.
zsh completion rules for less command expect a tagname doesn't contain a space.
-t
option of less command also expects it.
I would like to think about this issue more.
I'm thinking about introducing options to specify how spaces in a name is handled when ctags prints such name.
Sorry for the noise. Just switching the "Release blocker" tag for the "Initial release" milestone so that everything is tracked in one place.
If an option like --dont-use-whitespace-in-name, we can replace it with _
or -
.
In this case ctags should record the option is specified in a pseudo tag.
But I would like to introduce such option in 1.1.0, not in 1.0.0. Because, I would like to overhaul the whole area releated to pseudo tag in 1.1.0.
So what we should do in 1.0.0. is writing that we allow ctags using whitespaces in name to FORMAT file. I will write a draft version. I would like other to review it.
Suprisingly I already wrote in docs/format.rst. So let's move this to 1.1.0.
--output-format=u-ctags|e-ctags
option and !_TAG_OUTPUT_FORMAT
pseudo tag solved this isseu. u-ctags specific behavior is explained in tags(5).
I recognized this issue during writing for a test case for rpsec input( #453 )
Loot at our bible, docs/format.rst:
Some parsers violate this rule. About lua, I fixed in #491. This is just a bug of parser. Not so interesting. There is case that a target language, not a parser allows whitespaces in an object which a parser for the target language will record as a tag.
In all of the cases the target languages are for documentation tools. Here is an example.
tex is another example:
This one is reproducible in exuberant ctags.
What we should do?
I think the most of tools reading tags just look at tab. So spaces are accetable. Actually we don't receive any bug report about it. However, we have to write "universal ctags violates this rule. universal ctags allows spaces in tagname." Alternative approach is replacing a space with
_
.The real issue is a tab. If a tag name includes a tab, what we should do? My idea is just throwing away the tag in a parser level, not in entry.c till we receive a bug report.
Any comment?