Skip to content

Instantly share code, notes, and snippets.

2020-05-03-1807 Reference

Here is a file with many different wikilinks

foo bar

[[bar]]

[[foo]] #indented with a tab instead of space.

2020-05-03-1807 Reference

Here is a file with many different wikilinks

foo [[bar]]

[[bar]]

[[foo]] #indented with a tab instead of space.
@balaji-dutt
balaji-dutt / 1writer-hugo-action.js
Created May 10, 2020 02:51
Create Hugo front-matter in TOML format for 1Writer.app
// Inserts TOML-formatted frontmatter for Hugo as a heading at the beginning of your document.
// Warning: Only works correctly if you turn off "Smart Punctuation" in iOS settings.
// get filename
var filename = editor.getFileName().slice(0,-3);
//Get Timezone offset
// String such as +5:30 or -6:00 or Z
var timezone_offset_min = new Date().getTimezoneOffset(),
offset_hrs = parseInt(Math.abs(timezone_offset_min/60)),
@balaji-dutt
balaji-dutt / cut.lua
Created May 9, 2020 09:05
Quick and dirty Pandoc LUA filter to remove Markdown headers
-- Runs after initial Markdown file parsing and strips Level 2 headers with identifier {remove}
function Block (elem)
if elem.level == 2 and elem.identifier == 'remove' then
return {} -- "empty list" == remove
else
return head
end
end