File: manfilter.lua

package info (click to toggle)
pandoc 2.9.2.1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,412 kB
  • sloc: haskell: 63,627; xml: 3,294; makefile: 325; sh: 137; perl: 51; lisp: 32
file content (22 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- we use preloaded text to get a UTF-8 aware 'upper' function
local text = require('text')

-- capitalize level 1 headers
function Header(el)
    if el.level == 1 then
      return pandoc.walk_block(el, {
        Str = function(el)
            return pandoc.Str(text.upper(el.text))
        end })
    end
end

-- replace links with link text
function Link(el)
    return el.content
end

-- remove notes
function Note(el)
    return {}
end