diff --git a/markdown-toc-pkg.el b/markdown-toc-pkg.el index 094500a..030659c 100644 --- a/markdown-toc-pkg.el +++ b/markdown-toc-pkg.el @@ -1,4 +1,4 @@ -(define-package "markdown-toc" "0.1.0" "A simple TOC generator for markdown file" +(define-package "markdown-toc" "0.1.1" "A simple TOC generator for markdown file" '((s "1.9.0") (dash "2.11.0") (markdown-mode "2.1"))) diff --git a/markdown-toc.el b/markdown-toc.el index 2c1b4b9..3fffa89 100644 --- a/markdown-toc.el +++ b/markdown-toc.el @@ -5,7 +5,7 @@ ;; Maintainer: Antoine R. Dumont ;; URL: http://github.com/ardumont/markdown-toc ;; Created: 24th May 2014 -;; Version: 0.1.0 +;; Version: 0.1.1 ;; Keywords: markdown, toc, tools, ;; Package-Requires: ((markdown-mode "2.1") (dash "2.11.0") (s "1.9.0")) @@ -62,7 +62,7 @@ (require 'dash) (require 'markdown-mode) -(defconst markdown-toc--toc-version "0.1.0" "Current version installed.") +(defconst markdown-toc--toc-version "0.1.1" "Current version installed.") (defgroup markdown-toc nil "A simple TOC generator for markdown file." @@ -101,12 +101,18 @@ (-repeat it sym) (s-join "" it))) +(defconst markdown-toc--protection-symbol "09876543214b825dc642cb6eb9a060e54bf8d69288fbee49041234567890" + "Implementation detail to protect some punctuation characters + when converting to link.") + (defun markdown-toc--to-link (title) "Given a TITLE, return the markdown link associated." (format "[%s](#%s)" title (->> title downcase - (replace-regexp-in-string "[^a-z0-9 -]" "") + (replace-regexp-in-string "-" markdown-toc--protection-symbol) + (replace-regexp-in-string "[[:punct:]]" "") + (replace-regexp-in-string markdown-toc--protection-symbol "-") (s-replace " " "-")))) (defun markdown-toc--to-markdown-toc (level-title-toc-list) diff --git a/release-notes.md b/release-notes.md index 9239899..33bbad8 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,3 +1,9 @@ +# 0.1.1 + +- [X] Update version +- [X] Fix the problem when generating TOC for document with UTF-8 characters - Closes #24 +- [X] Release notes + # 0.1.0 - [X] Update dependencies (markdown-mode) diff --git a/test/markdown-toc-test.el b/test/markdown-toc-test.el index 7c660af..6ebdf05 100755 --- a/test/markdown-toc-test.el +++ b/test/markdown-toc-test.el @@ -117,6 +117,7 @@ NB-LINES-FORWARD is the number of lines to get back to." - [Marmalade (recommended)](#marmalade-recommended) - [Melpa-stable](#melpa-stable) - [Melpa (~snapshot)](#melpa-snapshot) + - [[配置 SPF Sender Policy Framework 记录]](#配置-spf-sender-policy-framework-记录) - [Install](#install) - [Load org-trello](#load-org-trello) - [Alternative](#alternative) @@ -132,6 +133,7 @@ For this, you need to install a snippet of code in your emacs configuration file ### Marmalade (recommended) ### Melpa-stable ### Melpa (~snapshot) +### [配置 SPF Sender Policy Framework 记录] ## Install ### Load org-trello ### Alternative @@ -147,6 +149,7 @@ For this, you need to install a snippet of code in your emacs configuration file ### Marmalade (recommended) ### Melpa-stable ### Melpa (~snapshot) +### [配置 SPF Sender Policy Framework 记录] ## Install ### Load org-trello ### Alternative diff --git a/todo.org b/todo.org index 61371ad..4dc0e8b 100644 --- a/todo.org +++ b/todo.org @@ -1,6 +1,11 @@ #+title: dev backlog #+author: ardumont +* DONE 0.1.1 [100%] +CLOSED: [2016-07-20 Wed 11:40] +- [X] Update version +- [X] Fix the problem when generating TOC for document with UTF-8 characters - Closes #24 +- [X] Release notes * DONE 0.1.0 [100%] CLOSED: [2016-02-27 Sat 11:16] - [X] Update dependencies (markdown-mode)