mcpride / atom-mdtoc Goto Github PK
View Code? Open in Web Editor NEWGenerate a markdown TOC (table of contents) in atom editor using Markdown-TOC and Remarkable from Jon Schlinkert.
License: MIT License
Generate a markdown TOC (table of contents) in atom editor using Markdown-TOC and Remarkable from Jon Schlinkert.
License: MIT License
[Enter steps to reproduce:]
Atom: 1.19.0-beta0 x64
Electron: 1.6.9
OS: Unknown Windows version
Thrown From: atom-mdtoc package 0.8.3
Uncaught RangeError: Invalid array length
At C:\Users\gilje\.atom\packages\atom-mdtoc\lib\toc-view.coffee:219
RangeError: Invalid array length
at String.module.exports.String.repeat (/packages/atom-mdtoc/lib/toc-view.coffee:219:27)
at LineNumberGutterComponent.render (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/text-editor-component.js:3007:43)
at Object.updateSync (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/component-helpers.js:99:40)
at LineNumberGutterComponent.update (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/text-editor-component.js:2973:18)
at updateComponent (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:52:19)
at patch (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:16:25)
at updateChildren (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:18:15)
at updateChildren (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:18:15)
at Object.updateSync (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/component-helpers.js:108:26)
at GutterContainerComponent.update (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/text-editor-component.js:2865:18)
at updateComponent (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:52:19)
at patch (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:16:25)
at updateChildren (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:18:15)
at updateChildren (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/patch.js:18:15)
at Object.updateSync (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/node_modules/etch/lib/component-helpers.js:108:26)
at TextEditorComponent.updateSyncBeforeMeasuringContent (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/text-editor-component.js:357:16)
at TextEditorComponent.updateSync (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/text-editor-component.js:259:16)
at etch.getScheduler.updateDocument (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/text-editor-component.js:212:46)
at ViewRegistry.module.exports.ViewRegistry.performDocumentUpdate (~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/view-registry.js:187:15)
at ~/AppData/Local/atom/app-1.19.0-beta0/resources/app/src/view-registry.js:3:65
-1:48.8.0 core:delete (input.hidden-input)
-1:41.3.0 core:paste (input.hidden-input)
2x -1:38 editor:outdent-selected-rows (input.hidden-input)
-1:29.1.0 core:move-left (input.hidden-input)
-1:20.9.0 editor:newline (input.hidden-input)
4x -1:20.6.0 core:backspace (input.hidden-input)
-1:19.4.0 editor:newline (input.hidden-input)
10x -1:19.1.0 core:backspace (input.hidden-input)
-1:14.3.0 editor:newline (input.hidden-input)
-1:14.2.0 markdown:indent-list-item (input.hidden-input)
2x -1:12.1.0 core:backspace (input.hidden-input)
2x -1:08.3.0 editor:newline (input.hidden-input)
2x -0:53.4.0 core:backspace (input.hidden-input)
6x -0:46.7.0 editor:outdent-selected-rows (input.hidden-input)
3x -0:17.9.0 editor:newline (input.hidden-input)
-0:12.2.0 atom-mdtoc:insert (div.line.cursor-line)
atom-beautify 0.29.26
atom-clock 0.1.9
atom-mdtoc 0.8.3
chester-atom-syntax 0.2.0
code-peek 1.4.20
color-picker 2.2.5
highlight-selected 0.13.1
language-markdown 0.23.0
markdown-preview-enhanced 0.13.0
package-sync 1.1.0
pigments 0.39.1
pretty-json 1.6.3
pubster-syntax 3.0.1
seti-syntax 1.1.3
seti-ui 1.8.0
tool-bar-markdown-writer 0.3.0
I’m using Atom 1.38.2 and atom-mdtoc 0.8.4. On my GitHub loudgain page, I use mdtoc to generate a TOC as follows:
<!-- MDTOC maxdepth:6 firsth1:2 numbering:0 flatten:0 bullets:1 updateOnSave:1 -->
<!-- /MDTOC -->
Unfortunately, headings containg several hyphens -
, endash –
or emdash —
seem to calculate links that don’t work out. (Try some headings on my page’s TOC like rgbpm.sh – Folder-based loudness and BPM scanning
.)
Here are some samples of what mdtoc generates – and what the GitHub link is:
[rgbpm.sh – Folder-based loudness and BPM scanning](#rgbpmsh-–-folder-based-loudness-and-bpm-scanning)
https://github.com/Moonbase59/loudgain/blob/albummode/README.md#rgbpmsh--folder-based-loudness-and-bpm-scanning
[Default mode `-s i` (`--tag-mode i`)](#default-mode-s-i-tag-mode-i)
https://github.com/Moonbase59/loudgain/blob/albummode/README.md#default-mode--s-i---tag-mode-i
# hello:test
renders to
- [Hello:test](#hello-test)
instead of
- [Hello:test](#hellotest)
Because of the dash in between the anchor, the URLs don't match the github URL anchors and won't link to them
[Enter steps to reproduce:]
Atom: 1.30.0 x64
Electron: 2.0.5
OS: Mac OS X 10.12.6
Thrown From: atom-mdtoc package 0.8.3
Uncaught RangeError: Invalid array length
At /Users/yshestakov/.atom/packages/atom-mdtoc/lib/toc-view.coffee:219
RangeError: Invalid array length
at String.module.exports.String.repeat (/packages/atom-mdtoc/lib/toc-view.coffee:219:27)
at LineNumberGutterComponent.render (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:3221:43)
at Object.updateSync (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/component-helpers.js:107:40)
at LineNumberGutterComponent.update (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:3185:18)
at updateComponent (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:52:19)
at patch (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:16:25)
at updateChildren (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:18:15)
at updateChildren (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:18:15)
at Object.updateSync (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/component-helpers.js:116:26)
at GutterContainerComponent.update (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:3076:18)
at updateComponent (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:52:19)
at patch (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:16:25)
at updateChildren (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:18:15)
at updateChildren (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:77:13)
at patch (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/patch.js:18:15)
at Object.updateSync (/Applications/Atom.app/Contents/Resources/app/node_modules/etch/lib/component-helpers.js:116:26)
at TextEditorComponent.updateSyncBeforeMeasuringContent (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:392:16)
at TextEditorComponent.updateSync (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:275:16)
at etch.getScheduler.updateDocument (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:225:46)
at ViewRegistry.performDocumentUpdate (/Applications/Atom.app/Contents/Resources/app/src/view-registry.js:238:13)
-0:14.5.0 core:backspace (input.hidden-input)
-0:12.4.0 core:save (input.hidden-input)
-0:11.4.0 command-palette:toggle (input.hidden-input)
-0:03.7.0 atom-mdtoc:insert (input.hidden-input)
atom-mdtoc 0.8.3
markdown-image-assistant 0.2.1
markdown-pdf 2.2.0
markdown-toc 0.4.2
When opening an existing file, saving the file does not update the TOC section. You must remove and re-insert the TOC. Would be a great addition to have TOC auto update files.
OSX 10.11.5
Atom 1.8.0
atom-mdtoc 0.8.3
[Enter steps to reproduce:]
Atom: 1.31.2 x64
Electron: 2.0.7
OS: Microsoft Windows 10 Pro
Thrown From: atom-mdtoc package 0.8.3
Uncaught TypeError: this.pane.getBuffer is not a function
At C:\Users\attri\.atom\packages\atom-mdtoc\lib\toc-view.coffee:18
TypeError: this.pane.getBuffer is not a function
at /packages/atom-mdtoc/lib/toc-view.coffee:18:11)
at Object.insert (/packages/atom-mdtoc/lib/atom-mdtoc.coffee:18:15)
at /packages/atom-mdtoc/lib/atom-mdtoc.coffee:9:36)
at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.31.2/resources/app/src/command-registry.js:384:49)
at CommandRegistry.dispatch (~/AppData/Local/atom/app-1.31.2/resources/app/src/command-registry.js:273:23)
at AtomEnvironment.dispatchApplicationMenuCommand (~/AppData/Local/atom/app-1.31.2/resources/app/src/atom-environment.js:1351:25)
at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.31.2/resources/app/src/application-delegate.js:311:53)
at emitThree (events.js:136:13)
at EventEmitter.emit (events.js:217:7)
-0:11.2.0 atom-mdtoc:insert (div.tool-panel.tree-view)
atom-mdtoc 0.8.3
markdown-pdf 2.1.0
markdown-preview-plus 2.5.1
markdown-toc 0.4.2
markdown-toc-auto 0.12.0
pdf-view 0.65.0
_Thanks for this great work!!!!_
I find a problem when I use this package with jekyll .
inicio / programacion / {{page.title}}
the problem seem that front matter is used as a link ....
but if I write
title: plantilla simple
inicio / programacion / {{page.title}}
everythink is OK ....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.