ardumont / markdown-toc

Generate a TOC in markdown file
GNU General Public License v3.0
127 stars 102 forks source link

Adds utility functions for refresh and delete #36

Closed sdwolfz closed 7 years ago

sdwolfz commented 7 years ago

This PR ads some utility functions:

These are all for interactive usage. Also markdown-toc-refresh-toc can for example be used in a before-save hook for markdown files.

Let me know what you think about this PR!

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-7.1%) to 91.304% when pulling 05770fcf657eb63e4b6f2a8367358cb1b085a732 on sdwolf:feature/utility-functions into 0edc303871517da67483119f2b1969055e6e0608 on ardumont:master.

sdwolfz commented 7 years ago

I've marked it as [WIP] until I add some tests.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-7.1%) to 91.304% when pulling 48a09e6444db5c546edf2b5174343f359f4b2692 on sdwolf:feature/utility-functions into 0edc303871517da67483119f2b1969055e6e0608 on ardumont:master.

ardumont commented 7 years ago

This PR ads some utility functions: ... Let me know what you think about this PR!

This seems like a good idea. Thanks for proposing

I have a couple of questions that I inlined as comments.

I've marked it as [WIP] until I add some tests.

Awesome.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.09%) to 98.507% when pulling d45921acf22df81f7a6d0e8a8e44b8f6016f4f90 on sdwolf:feature/utility-functions into 0edc303871517da67483119f2b1969055e6e0608 on ardumont:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 98.551% when pulling 3a687d8e88abbc2c6767afb6ade4eff231d8279a on sdwolf:feature/utility-functions into 0edc303871517da67483119f2b1969055e6e0608 on ardumont:master.

sdwolfz commented 7 years ago

I've added unit tests. The save-excursion did not work for deleting a TOC so I updated the code to use the old logic.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 98.551% when pulling 5f22dcb9a7bf6c3e7a9fabf4ac10531286fffb11 on sdwolf:feature/utility-functions into 0edc303871517da67483119f2b1969055e6e0608 on ardumont:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 98.551% when pulling 8ed5911de25773cdefb20722b78d45d063bb75e7 on sdwolf:feature/utility-functions into 0edc303871517da67483119f2b1969055e6e0608 on ardumont:master.