Skip to content

Commit 5aba05e

Browse files
author
pedro
committed
initial commit
0 parents  commit 5aba05e

31 files changed

+1485
-0
lines changed

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[Makefile]
14+
indent_style = tab
15+
16+
*.lua]
17+
indent_style = space
18+
indent_size = 2
19+
# Code should stay below 80 characters per line.
20+
max_line_length = 80
21+
22+
[*.diff]
23+
trim_trailing_whitespace = false
24+
25+
[*.md]
26+
# Text with 60 to 66 characters per line is said to be the easiest
27+
# to read.
28+
max_line_length = 66

.github/workflows/test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test-3_1_3:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: pandoc/actions/setup@v1
16+
with:
17+
version: 3.1.3
18+
19+
- name: Run alerts-normalize tests (Pandoc)
20+
run: make test-pandoc
21+
22+
- name: Run alerts-normalize tests (Quarto format)
23+
run: make test-quarto
24+
25+
test-latest:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: pandoc/actions/setup@v1
31+
32+
- name: Run alerts-normalize tests (Pandoc)
33+
run: make test-pandoc
34+
35+
- name: Run alerts-normalize tests (Quarto format)
36+
run: make test-quarto
37+
38+
test-quarto:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Install LaTeX packages
44+
run: sudo apt-get install -y texlive-fonts-extra texlive-luatex context
45+
46+
- uses: quarto-dev/quarto-actions/setup@v2
47+
48+
- name: Run alerts-normalize tests (Quarto + pandoc-format)
49+
run: make test-quarto-pandoc
50+
51+
- name: Run alerts-normalize example (all formats)
52+
run: cd examples && make all

.luacheckrc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
stds.pandoc = {
2+
read_globals = {
3+
'FORMAT',
4+
'PANDOC_READER_OPTIONS',
5+
'PANDOC_WRITER_OPTIONS',
6+
'PANDOC_VERSION',
7+
'PANDOC_API_VERSION',
8+
'PANDOC_SCRIPT_FILE',
9+
'PANDOC_STATE',
10+
'pandoc',
11+
'lpeg',
12+
're'
13+
},
14+
15+
globals = {
16+
'traverse',
17+
'BlockQuote',
18+
'Blocks',
19+
'BulletList',
20+
'Cite',
21+
'Code',
22+
'CodeBlock',
23+
'DefinitionList',
24+
'Div',
25+
'Emph',
26+
'Figure',
27+
'Header',
28+
'HorizontalRule',
29+
'Image',
30+
'Inlines',
31+
'LineBlock',
32+
'LineBreak',
33+
'Link',
34+
'Math',
35+
'Meta',
36+
'Note',
37+
'OrderedList',
38+
'Pandoc',
39+
'Para',
40+
'Plain',
41+
'Quote',
42+
'RawBlock',
43+
'RawInline',
44+
'SmallCaps',
45+
'SoftBreak',
46+
'Space',
47+
'Span',
48+
'Str',
49+
'Strikeout',
50+
'Strong',
51+
'Subscript',
52+
'Superscript',
53+
'Underline',
54+
'Table'
55+
}
56+
}
57+
58+
std = 'lua54+pandoc'

CITATION.cff

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cff-version: 1.2.0
2+
message: "If you use this filter, please cite it."
3+
authors:
4+
- family-names: "Barrio"
5+
given-names: "Pedro Luis"
6+
title: "alerts-normalize.lua"
7+
version: 0.1.0
8+
date-released: 2026-03-22
9+
url: "https://github.com/plbarrio/alerts-normalize"
10+
license: GPL-3.0-or-later
11+
abstract: >
12+
Pandoc Lua filter that converts GitHub alert blockquote syntax to classed
13+
Divs compatible with plain Pandoc and container-writer, or to native
14+
callout-* Divs when running inside Quarto.
15+
keywords:
16+
- pandoc
17+
- lua-filter
18+
- quarto
19+
- markdown
20+
- publishing

0 commit comments

Comments
 (0)