Skip to content

Commit 09430ef

Browse files
authored
Merge branch 'master' into fix-warnings
2 parents bcec68f + dc7d5ed commit 09430ef

File tree

9 files changed

+123
-100
lines changed

9 files changed

+123
-100
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
runs-on: ${{ matrix.os }}
17+
continue-on-error: ${{ matrix.experimental }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, macos-latest, windows-latest]
22+
emacs-version:
23+
- 27.2
24+
- 28.2
25+
- 29.4
26+
experimental: [false]
27+
include:
28+
- os: ubuntu-latest
29+
emacs-version: snapshot
30+
experimental: true
31+
- os: macos-latest
32+
emacs-version: snapshot
33+
experimental: true
34+
- os: windows-latest
35+
emacs-version: snapshot
36+
experimental: true
37+
exclude:
38+
- os: macos-latest
39+
emacs-version: 27.2
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- uses: jcs090218/setup-emacs@master
45+
with:
46+
version: ${{ matrix.emacs-version }}
47+
48+
- uses: emacs-eask/setup-eask@master
49+
with:
50+
version: 'snapshot'
51+
52+
- name: Run tests
53+
run:
54+
make ci

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/.cask/
2+
/.eask/
3+
/dist
24
/test.md
35
/result
6+
47
*.elc

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Cask

Lines changed: 0 additions & 15 deletions
This file was deleted.

Eask

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(package "markdown-toc"
2+
"0.1.5"
3+
"A simple TOC generator for markdown file")
4+
5+
(website-url "http://github.com/ardumont/markdown-toc")
6+
(keywords "markdown" "toc" "tools")
7+
8+
(package-file "markdown-toc.el")
9+
10+
(script "test" "echo \"Error: no test specified\" && exit 1")
11+
12+
(source 'gnu)
13+
(source 'melpa)
14+
15+
(depends-on "emacs" "27.1")
16+
(depends-on "markdown-mode")
17+
(depends-on "dash")
18+
(depends-on "s")
19+
20+
(development
21+
(depends-on "ert-runner")
22+
(depends-on "undercover")
23+
(depends-on "ert")
24+
(depends-on "el-mock")
25+
(depends-on "mocker"))

Makefile

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,33 @@
1-
MODE_NAME=markdown-toc
2-
VERSION=$$(grep "^;; Version: " $(MODE_NAME).el | cut -f3 -d' ')
3-
PACKAGE_FOLDER=$(MODE_NAME)-$(VERSION)
4-
ARCHIVE=$(PACKAGE_FOLDER).tar
5-
EMACS=emacs
6-
CASK ?= cask
7-
LANG=en_US.UTF-8
1+
EMACS ?= emacs
2+
EASK ?= eask
83

9-
.PHONY: clean
4+
.PHONY: clean checkdoc lint package install compile test
105

11-
activate:
12-
nix develop
6+
ci: clean package install compile checkdoc
137

14-
pr:
15-
hub pull-request -b ardumont:master
16-
17-
build:
18-
${CASK} build
19-
20-
clean-cask:
21-
[ -d .cask ] && rm -rf .cask/ || echo
22-
23-
clean-dist:
24-
[ -d dist ] && rm -rf dist/ || echo
25-
26-
clean: clean-dist clean-cask
27-
rm -rf ${ARCHIVE}
28-
${CASK} clean-elc
8+
package:
9+
@echo "Packaging..."
10+
$(EASK) package
2911

3012
install:
31-
[ ! -d .cask ] && ${CASK} install || echo
32-
33-
test: install
34-
${CASK} exec ert-runner
35-
36-
pkg-file:
37-
${CASK} pkg-file
13+
@echo "Installing..."
14+
$(EASK) install
3815

39-
pkg-el: pkg-file
40-
${CASK} package
16+
compile:
17+
@echo "Compiling..."
18+
$(EASK) compile
4119

42-
package: clean pkg-el
43-
cp dist/$(ARCHIVE) .
44-
make clean-dist
20+
test:
21+
@echo "Testing..."
22+
$(EASK) test ert ./test/*.el
4523

46-
info:
47-
${CASK} info
24+
checkdoc:
25+
@echo "Run checkdoc..."
26+
$(EASK) lint checkdoc
4827

49-
release:
50-
./release.sh $(VERSION)
28+
lint:
29+
@echo "Run package-lint..."
30+
$(EASK) lint package
5131

52-
version:
53-
@echo "application $(PACKAGE): $(VERSION)\npackage: $(ARCHIVE)"
32+
clean:
33+
$(EASK) clean all

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
markdown-toc
2-
============
3-
4-
[![Build Status](https://travis-ci.com/ardumont/markdown-toc.png?branch=master)](https://travis-ci.com/ardumont/markdown-toc) [![Coverage Status](https://coveralls.io/repos/ardumont/markdown-toc/badge.svg?branch=master&service=github)](https://coveralls.io/github/ardumont/markdown-toc?branch=master) [![MELPA Stable](http://stable.melpa.org/packages/markdown-toc-badge.svg)](http://stable.melpa.org/#/markdown-toc) [![MELPA](http://melpa.org/packages/markdown-toc-badge.svg)](http://melpa.org/#/markdown-toc) [![SWH](https://archive.softwareheritage.org/badge/origin/https://github.com/ardumont/markdown-toc/)](https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/ardumont/markdown-toc)
1+
# markdown-toc
2+
3+
[![Build Status](https://travis-ci.com/ardumont/markdown-toc.png?branch=master)](https://travis-ci.com/ardumont/markdown-toc)
4+
[![CI](https://github.com/ardumont/markdown-toc/actions/workflows/test.yml/badge.svg)](https://github.com/ardumont/markdown-toc/actions/workflows/test.yml)
5+
[![Coverage Status](https://coveralls.io/repos/ardumont/markdown-toc/badge.svg?branch=master&service=github)](https://coveralls.io/github/ardumont/markdown-toc?branch=master)
6+
[![MELPA Stable](http://stable.melpa.org/packages/markdown-toc-badge.svg)](http://stable.melpa.org/#/markdown-toc)
7+
[![MELPA](http://melpa.org/packages/markdown-toc-badge.svg)](http://melpa.org/#/markdown-toc)
8+
[![SWH](https://archive.softwareheritage.org/badge/origin/https://github.com/ardumont/markdown-toc/)](https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/ardumont/markdown-toc)
59

610
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
711
**Table of Contents**

markdown-toc.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
;;; markdown-toc.el --- A simple TOC generator for markdown file -*- lexical-binding: t; -*-
2+
23
;; Copyright (C) 2014-2020 Antoine R. Dumont (@ardumont)
34

45
;; Author: Antoine R. Dumont (@ardumont)
56
;; Maintainer: Antoine R. Dumont (@ardumont)
7+
;; Jen-Chieh Shen <[email protected]>
68
;; URL: http://github.com/ardumont/markdown-toc
79
;; Created: 24th May 2014
810
;; Version: 0.1.5
911
;; Keywords: markdown, toc, tools,
10-
;; Package-Requires: ((emacs "24.1") (markdown-mode "2.1") (dash "2.11.0") (s "1.9.0"))
12+
;; Package-Requires: ((emacs "27.1") (markdown-mode "2.1") (dash "2.11.0") (s "1.9.0"))
1113

1214
;; This file is NOT part of GNU Emacs.
1315

@@ -181,7 +183,7 @@ ensure uniqueness."
181183
downcase
182184
(s-replace "-" markdown-toc--dash-protection-symbol)
183185
(s-replace "_" markdown-toc--underscore-protection-symbol)
184-
(replace-regexp-in-string "[[:punct:]]" "")
186+
(replace-regexp-in-string "[[:punct:][:nonascii:]]" "")
185187
(s-replace markdown-toc--dash-protection-symbol "-")
186188
(s-replace markdown-toc--underscore-protection-symbol "_")
187189
(s-replace " " "-"))

0 commit comments

Comments
 (0)