[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash ab727ba 257/426: Correct anchors for links startin
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash ab727ba 257/426: Correct anchors for links starting with '!' |
Date: |
Tue, 04 Aug 2015 19:38:07 +0000 |
branch: externals/dash
commit ab727ba4cfdb305e37ce37d73ee1d235350b080e
Author: Philippe Vaucher <address@hidden>
Commit: Philippe Vaucher <address@hidden>
Correct anchors for links starting with '!'
---
README.md | 4 ++--
dev/examples-to-docs.el | 12 +++++++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index d96744a..1436a00 100644
--- a/README.md
+++ b/README.md
@@ -155,8 +155,8 @@ Include this in your emacs settings to get syntax
highlighting:
### Destructive operations
-* [!cons](#-cons-car-cdr) `(car cdr)`
-* [!cdr](#-cdr-list) `(list)`
+* [!cons](#cons-car-cdr) `(car cdr)`
+* [!cdr](#cdr-list) `(list)`
### Function combinators
diff --git a/dev/examples-to-docs.el b/dev/examples-to-docs.el
index c8e82de..2353b81 100644
--- a/dev/examples-to-docs.el
+++ b/dev/examples-to-docs.el
@@ -72,6 +72,14 @@ FUNCTION may reference an elisp function, alias, macro or a
subr."
docstring
(mapconcat 'identity (-take 3 examples) "\n")))))
+(defun docs--chop-prefix (prefix s)
+ "Remove PREFIX if it is at the start of S."
+ (let ((pos (length prefix)))
+ (if (and (>= (length s) (length prefix))
+ (string= prefix (substring s 0 pos)))
+ (substring s pos)
+ s)))
+
(defun docs--chop-suffix (suffix s)
"Remove SUFFIX if it is at end of S."
(let ((pos (- (length suffix))))
@@ -83,7 +91,9 @@ FUNCTION may reference an elisp function, alias, macro or a
subr."
(defun github-id (command-name signature)
(docs--chop-suffix
"-"
- (replace-regexp-in-string "[^a-zA-Z0-9-]+" "-" (format "%S %S" command-name
signature))))
+ (replace-regexp-in-string "[^a-zA-Z0-9-]+" "-" (docs--chop-prefix
+ "!"
+ (format "%S %S"
command-name signature)))))
(defun s-replace (old new s)
"Replaces OLD with NEW in S."
- [elpa] externals/dash 6d43c4f 235/426: Fix switched around doc strings for -find-index/indices, (continued)
- [elpa] externals/dash 6d43c4f 235/426: Fix switched around doc strings for -find-index/indices, Phillip Lord, 2015/08/04
- [elpa] externals/dash 459322d 244/426: Update docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9936885 245/426: Merge pull request #51 from Fuco1/debug-decl, Phillip Lord, 2015/08/04
- [elpa] externals/dash 0f4cae9 249/426: Improve docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash 23ab726 227/426: Improve formatting of docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash f4ba8db 252/426: Add -snoc, Phillip Lord, 2015/08/04
- [elpa] externals/dash bf85b21 242/426: Change &optional branches to &rest branches in `-if-let`s, Phillip Lord, 2015/08/04
- [elpa] externals/dash bf99147 247/426: Fix `-tree-mapreduce-from` test & reformat the tests, Phillip Lord, 2015/08/04
- [elpa] externals/dash 75efb60 246/426: Add tree map/reduce, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2ee84cb 251/426: Release 2.3.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash ab727ba 257/426: Correct anchors for links starting with '!',
Phillip Lord <=
- [elpa] externals/dash 8052eb9 253/426: Merge pull request #55 from Fuco1/snoc, Phillip Lord, 2015/08/04
- [elpa] externals/dash d8ccf85 254/426: Add replace/update/remove functions for index/indices, Phillip Lord, 2015/08/04
- [elpa] externals/dash ba6e3c6 260/426: Add missing keywords, Phillip Lord, 2015/08/04
- [elpa] externals/dash 87bcbc8 261/426: Merge pull request #59 from Fuco1/add-keywords, Phillip Lord, 2015/08/04
- [elpa] externals/dash 094fdea 262/426: Merge pull request #58 from Fuco1/fontlock-custom, Phillip Lord, 2015/08/04
- [elpa] externals/dash ca9b296 263/426: Add Cask-file., Phillip Lord, 2015/08/04
- [elpa] externals/dash 3bbaed5 256/426: Release 2.4.0, Phillip Lord, 2015/08/04
- [elpa] externals/dash 8005153 259/426: Add customize option to turn on font-lock for dash, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9de1435 248/426: Merge pull request #53 from Fuco1/tree-stuff, Phillip Lord, 2015/08/04
- [elpa] externals/dash 7357283 258/426: Merge pull request #57 from Silex/master, Phillip Lord, 2015/08/04