Coder Social home page Coder Social logo

Comments (11)

yzhang-gh avatar yzhang-gh commented on August 23, 2024 1

I'll add an additional rule which is

  • It should be a within-document anchor (something like #header-title) not a link (http://...)

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Thank you for the feedback. I'll look into it this weekend.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

It seems that I cannot reproduce that with the snippet you provided 🤔.
Could you please provide more details? (e.g. vscode version, the text which was misrecognized as TOC)

image

from vscode-markdown.

Ytrog avatar Ytrog commented on August 23, 2024

VSCode 1.13.1
image

As I don't want to leak information I obfuscated the actual text (it shouldn't really matter):
image

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Okay, I see the bug.
But I have no idea about why. Can you try to reproduce it with some not secret text? 😅


Below is the current behaviors,

To avoid distractive HTML comments, this extension will 'guess' where the TOC is. Currently, a TOC will be recognized if

  • It's a list block in Markdown syntax
  • Its first list item title matches the first heading in the file

from vscode-markdown.

Ytrog avatar Ytrog commented on August 23, 2024

Ah, the first item matches the title (a level 1 header) so the second rule triggers.

It would be like

# PR-123456 Build a new window

## Issues
- [PR-123456 Build a new window](http://issuetracker/PR-123456)
- [PR-123457 A related issue](http://issuetracker/PR-123457)

Too bad markdown doesn't have comments or it would be possible to make a NoTOC tag that doesn't show in the output.

from vscode-markdown.

Ytrog avatar Ytrog commented on August 23, 2024

I like the idea 👍

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

I've fixed it. But I cannot publish the new version because of the bad network connection. Let's ship it tomorrow.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Published! If you are satisfied with it, please give me a 5 stars 😉

from vscode-markdown.

Ytrog avatar Ytrog commented on August 23, 2024

It seems fixed 😄

Amended my review ;)

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Thanks 😎

from vscode-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.