Giter VIP home page Giter VIP logo

atom-markdown-toc-auto's Introduction

personal image registories for my oss project

atom-markdown-toc-auto's People

Contributors

darkdragon-001 avatar justinhartman avatar nemodreamer avatar t9md avatar thancock20 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

atom-markdown-toc-auto's Issues

Support new TOC spec

  • update: true or false to control auto update on save
  • link
  • style: ol, ul default is ul I don't think it's useful

Uncaught TypeError: Cannot read property 'startsWith' of undefined

[Enter steps to reproduce:]

  1. On MAC Ctr + Shift + P and selecting Auto ToC

Atom: 1.27.1 x64
Electron: 1.7.15
OS: Mac OS X 10.13.4
Thrown From: markdown-toc-auto package 0.9.0

Stack Trace

Uncaught TypeError: Cannot read property 'startsWith' of undefined

At /Users/vikassri/.atom/packages/markdown-toc-auto/lib/utils.js:68

TypeError: Cannot read property 'startsWith' of undefined
    at isMarkdownHeader (/packages/markdown-toc-auto/lib/utils.js:68:72)
    at editor.scan (/packages/markdown-toc-auto/lib/utils.js:75:10)
    at TextBuffer.module.exports.TextBuffer.scanInRange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1118:15)
    at TextBuffer.module.exports.TextBuffer.scan (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1073:25)
    at TextEditor.scan (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:3530:30)
    at scanHeaders (/packages/markdown-toc-auto/lib/utils.js:74:10)
    at insertToc (/packages/markdown-toc-auto/lib/utils.js:131:23)
    at Object.insertTocAtPoint (/packages/markdown-toc-auto/lib/utils.js:155:3)
    at /packages/markdown-toc-auto/lib/main.js:22:20)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at Object.didConfirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:152:35)
    at SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-select-list/src/select-list-view.js:401:26)
    at HTMLDivElement.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-select-list/src/select-list-view.js:106:20)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:110:40)

Commands

     -0:10.7.0 core:save (input.hidden-input)
     -0:08.1.0 core:backspace (input.hidden-input)
     -0:06.3.0 command-palette:toggle (input.hidden-input)
     -0:04.2.0 core:confirm (input.hidden-input)
     -0:04.2.0 markdown-toc-auto:insert-toc (input.hidden-input)

Non-Core Packages

atom-beautify 0.32.4 
atom-ide-ui 0.12.0 
auto-detect-indentation 1.3.0 
auto-indent 0.5.0 
autocomplete-python 1.10.5 
busy-signal 1.4.3 
city-lights-ui 1.3.3 
docker 0.8.0 
file-icons 2.1.21 
fold-functions 0.5.0 
fold-lines 0.2.2 
foldingtext-for-atom 0.9.2 
ftp-remote-edit 0.12.12 
git-time-machine 2.0.1 
ide-python 0.9.2 
ide-yang 0.1.0 
intentions 1.1.5 
language-cisco 1.4.0 
language-docker 1.1.8 
language-markdown 0.25.1 
language-yang 0.2.0 
linter 2.2.0 
linter-markdown 5.2.2 
linter-python-pep8 0.2.0 
linter-ui-default 1.7.1 
linter-xmllint 1.4.4 
markdown-image-paste 2.5.2 
markdown-img-paste 0.3.9 
markdown-preview-enhanced 0.15.6 
markdown-scroll-sync 2.1.2 
markdown-table-editor 1.1.1 
markdown-toc 0.4.2 
markdown-toc-auto 0.9.0 
markdown-writer 2.7.3 
platformio-ide-terminal 2.8.1 
python-autopep8 0.1.3 
python-indent 1.1.5 
recursive-folding 0.2.2 
remember-folds 0.3.0 
remote-ftp 2.2.0 
set-syntax 0.4.0 
split-diff 1.5.2 
Sublime-Style-Column-Selection 1.7.4 
tidy-markdown 3.0.1 
windows-carriage-return-remover 0.1.3 
xml-formatter 0.11.0 

Want to change the unordered list to be asterisk

As the current version, TOC generator uses hyphen(-) for unordered list.
But I want to use the asterisk(*) for keeping my markdown style.

Where can I change the setting?

And thanks so much for what you've done.
Brilliant job 👍

Can i jump in the same page when i click TOC menu?

when it is a long markdown file, and it generates a TOC menu, can i jump to the title in the same page by click TOC menu ?

i'm afraid i didn't use it correctly, as the TOC generate a id like (#-2),just like this
maybe it meets some trouble when it meets Chinese character?
Or is there anything should i do?
Thank you very very much!

Same header text leads to same link, unlike GitHub’s Markdown renderer

Consider:

# Problems

## Base64
### Haskell
### Rust

## XOR key
### Rust
### Octave
### Haskell

GitHub.com will give the first pair of “Rust” and “Haskell” headings #rust and #haskell IDs, and the second set will get IDs #rust-1 and #haskell-1. Neither this package nor the markdown-tocpackage match GitHub.com’s style.

markdown-toc-auto usage question

I have Markdown-toc-auto package installed in my Atom editor. It seems to create the Table of Contents OK but I am not sure how to make these TOC clickable entries to actually go to the proper location the document. The resultant Preview display of the TOC appears to be clickable but goes nowhere.

example is this.

Those entries are apparently derived from the Headers in the documents. But when I click on the link in the Atom Preview Mode, the editor does NOT go to the appropriate Header in the text document.. What am I missing?

Extra line-break

Praise

Firstly, this is the best markdown TOC package, fast reliable and simple. Thank you for your work.

Extra line-break

I was wondering if the second line-break before the end was intended.

<!-- TOC START -->
- headings

<!-- TOC END -->

It annoys me when writing, so I deleted it. In lib\utils.js line 136 delete the last \n

136 toc += buildTocText(editor, scanHeaders(editor), options) + '\n\n'

Feature Request: Title

Also, I like titles and currently use > # TOC as a title. How would you implement that as an automated thing?

<!-- TOC START title:true -->
> # Table of Contents
- headings
<!-- TOC END -->

Plugin options don't appear in Command Palette

I currently updated Atom to 1.18.0 alongside with the plugins I have installed. Now, the Markdown TOC Auto entries are not showing up in the Command Palette. Is this a known issue?

Thanks for the plugin BTW. It makes my life so much easier while writing GitHub wikis :)

Don't indent whole TOC when `min > 1`

When min is greater than 1, the indentation of each TOC line isn't adjusted, leading to linting errors. Or worse, when min is greater than 2: the entire TOC gets interpreted as an indented code-block.

Quick PR coming!

TextBuffer.setTextInRange is deprecated.

The undo option is deprecated. Call groupLastChanges() on the TextBuffer afterward instead.

TextBuffer.setTextInRange (<embedded>:33539:22)
TextEditor.setTextInBufferRange (<embedded>:3552:35)
insertToc (/Users/Viktor/.atom/packages/markdown-toc-auto/lib/utils.js:143:10)
Object.insertTocAtPoint (/Users/Viktor/.atom/packages/markdown-toc-auto/lib/utils.js:155:3)
HTMLElement.markdown-toc-auto:insert-toc (/Users/Viktor/.atom/packages/markdown-toc-auto/lib/main.js:22:20)
CommandRegistry.handleCommandEvent (<embedded>:23883:49)

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.