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

Problem with a title with a backquote at the end #13

Closed
flaf opened this issue Jul 12, 2015 · 2 comments
Closed

Problem with a title with a backquote at the end #13

flaf opened this issue Jul 12, 2015 · 2 comments

Comments

@flaf
Copy link

flaf commented Jul 12, 2015

Hi,

First, thanks for this useful script. Second, it seems to me that there is a problem when a title has a backquote at the end. Here is an example with this simple markdown file:

# The command `foo1`

Blabla...

# The command `foo2` is better

Blabla...

# The command `bar1`

Blabla...

# The command `bar2` is better

Blabla...

I have this:

~$ ./gh-md-toc /tmp/test.md 

Table of Contents
=================

 * [](#the-command-foo1)
  * [The command <code>foo2</code> is better](#the-command-foo2-is-better)
 * [](#the-command-bar1)
  * [The command <code>bar2</code> is better](#the-command-bar2-is-better)

Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)

Regards

@ekalinin
Copy link
Owner

Hi,

First, thanks for this useful script.

Glad that it was useful for you.

Second, it seems to me that there is a problem when a title has a backquote at the end

Thanks for report. Yes, seems, we have a problem here.

Btw, you can try to use a go-based implementation of this script:

I've fixed this issue there:

➥ cat test.md 
# The command `foo1`

Blabla...

# The command `foo2` is better

Blabla...

# The command `bar1`

Blabla...

# The command `bar2` is better

Blabla...

➥ ./gh-md-toc test.md 

Table of Contents
=================

  * [The command foo1](#the-command-foo1)
  * [The command foo2 is better](#the-command-foo2-is-better)
  * [The command bar1](#the-command-bar1)
  * [The command bar2 is better](#the-command-bar2-is-better)

Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)

➥ file gh-md-toc
gh-md-toc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped

➥ ./gh-md-toc --version
0.3.1

ekalinin added a commit that referenced this issue Jul 15, 2015
@flaf
Copy link
Author

flaf commented Jul 15, 2015

Hi,

Thx ekalinin. I will use the project in Go. It works well.
Bye.

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