forked from universal-ctags/ctags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: trim whitespace prefix from tag name
Close universal-ctags#1141 Original issue: [yamato@x201]~/var/ctags-github% cat /tmp/foo.html cat /tmp/foo.html <h1> ABC</h1> [yamato@x201]~/var/ctags-github% ./ctags /tmp/foo.html ./ctags /tmp/foo.html [yamato@x201]~/var/ctags-github% cat tags cat tags ABC /tmp/foo.html /^<h1> ABC<\/h1>$/;" h !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 0.0.0 /25bad34/ Look at the whiespace before ABC. If a tag name is started with a whitespace, it is printed in tags file before pseudo tags. I guess this behavior make client tools get into crazy. This patch trims whitespace characters at the head of tag name. trimPrefixedWhitespaces() function is much simpflied by @codebrainz. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
- Loading branch information
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
heading1 input.html /^<\/h1>$/;" h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1> | ||
heading1 | ||
</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
\n input.js /^let`$/;" v | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters