Sha256: b5502285f05ea85df7007800dafa954d1b6d104babd364d37cbadf5a168cd888

Contents?: true

Size: 213 Bytes

Versions: 2

Compression:

Stored size: 213 Bytes

Contents

-- Lua filter for Pandoc.

-- Add target="_blank" attribute to all external links.
function Link(el)
    if string.match(el.target, '^http') then
        el.attributes.target = '_blank'
    end
    return el
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
intranet-pandoc-1.1.0 lib/intranet/resources/filters/links-open-external-in-new-tab.lua
intranet-pandoc-1.0.0 lib/intranet/resources/filters/links-open-external-in-new-tab.lua