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 within shell code of markdown fiiles are recognized as chapters #3483

Closed
lpyparmentier opened this issue Sep 16, 2022 · 7 comments
Closed

Comments

@lpyparmentier
Copy link

lpyparmentier commented Sep 16, 2022

Hello,

I think the title should be explicit enough. If not I hope that the following image will (that's it ! shouldn't be a chapter):

image

I've notice this problem by using VI with the plugin preservim which uses universal-ctags to generate the right window, see the related issue: preservim/tagbar#832

The version of ctags:

$ ctags --version
Universal Ctags 0.0.0, Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jan  6 2019, 23:23:29
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml

How do you get ctags binary:

Installed with apt package manager on Ubuntu 20.04.5 LTS

@masatake
Copy link
Member

masatake commented Sep 16, 2022

Please, don't use a screenshot.
Copy the source code causing trouble as text.

I think the title should be explicit enough.

I don't think so.
For fixing the bug, I have to run ctags with the input.
ctags accepts only text, not png. So I have to write png2text first.
I don't want to do that.

@masatake
Copy link
Member

You should use the template for reporting a parser bug.

https://github.com/universal-ctags/ctags/blob/master/.github/ISSUE_TEMPLATE.md

@masatake
Copy link
Member

Please, reopen this as a new issue with text input, not screenshot.

@lpyparmentier
Copy link
Author

ok thanks, I'm sorry, I don't know exactly how the plugin is calling the ctags. I have take a look how I can have more debug.

@masatake
Copy link
Member

What I need is the input text you showed on your text editor.
So I can run ctags with the input.

@masatake
Copy link
Member

masatake commented Sep 21, 2022

You don't provide the input text.
So I have to do OCR.

$ cat /tmp/foo.md
# Chapter 1

## Subsction

List a file:

```sh
# that's it!
ls
```
$ ./ctags --options=NONE  -o -  /tmp/foo.md 
ctags: Notice: No options will be read from files or environment
Chapter 1	/tmp/foo.md	/^# Chapter 1$/;"	c
Subsction	/tmp/foo.md	/^## Subsction$/;"	s	chapter:Chapter 1
$ 

I couldn't reproduce the issue with the latest ctags.

I guess you used older ctags or a file under your ~/.ctags.d is imperfect. --options=NONE as the first argument lets ctags unread options files under ~/.ctags.

@masatake
Copy link
Member

  Compiled: Jan  6 2019, 23:23:29

Too old.

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

2 participants