This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- urlEncode: URL-encode a string. | |
-- @param str string | |
-- @param spaceToPlus bool (optional) convert spaces to `+` | |
local function urlEncode(str, spaceToPlus) | |
-- safe characters: 0-9a-zA-Z%-._~ | |
-- as per RFC 3986, Section 2.3 <https://www.rfc-editor.org/rfc/rfc3986#section-2.3> | |
-- %w matches UTF-8 starting bytes but they should be encoded, | |
-- so we use the explicit charset 0-9a-zA-Z instead. | |
local charset = '0-9a-zA-Z%-._~' | |
if spaceToPlus then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Label list via CSS</title> | |
<style type="text/css"> | |
body { | |
margin: 20px 100px; | |
border: 1px solid gray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ fixSubLists.lua Fix badly formed HTML sublists in Pandoc | |
Apple Notes (via AppleScript) produces badly formed HTML | |
for sublists: | |
<ul> | |
<li>Level 1 element 1</li> | |
<ul> | |
<li>Level 2 element 1</li> | |
<li>Level 2 element 2</li> |