# - ? ... three-dot ellipsis (smartypants)
# - [-] en-dash (smartypants)
# - [ ] Automatic em-dash / en-dash
-# - [ ] Automatic -> Arrows <-
+# - [x] Automatic -> Arrows <- (custom)
function debug(text) { printf "\n---\n%s\n---\n", text > "/dev/stderr"; }
if ( line ~ /^$/ ) { # Recursion End
return "";
- # omit processing of escaped characters
+ # omit processing of escaped characters
} else if ( line ~ /^\\[]\\`\*_\{\}\(\)#\+-\.![]/) {
return substr(line, 2, 1) inline( substr(line, 3) );
len = RLENGTH;
return substr( line, 1, len ) inline(substr(line, len + 1));
+ # Arrows
+ } else if ( line ~ /^-->( |$)/) { # ignore multidash-arrow
+ return "-->" inline( substr(line, 4) );
+ } else if ( line ~ /^<-( |$)/) {
+ return "←" inline( substr(line, 3) );
+ } else if ( line ~ /^->( |$)/) {
+ return "→" inline( substr(line, 3) );
+
# Escape lone HTML character
} else if ( match( line, /^[&<>"']/) ) {
return HTML(substr(line, 1, 1)) inline(substr(line, 2));