~acdw/hell

0aab5270c8b230adf125d26fc14d98f0a731cf06 — Case Duckworth a month ago 0387879
Improve argument handling
1 files changed, 6 insertions(+), 4 deletions(-)

M hell.sh
M hell.sh => hell.sh +6 -4
@@ 123,27 123,29 @@ tag()
	case "$1" in
		-i) # inline
			tagstack="$INLINES"
			shift
			;;
		-b) # block
			tagstack="$BLOCKS"
			shift
			;;
		*) # other -- default to block
			tagstack="$BLOCKS"
			;;
	esac

	case "$2" in
	case "$1" in
		*/) # set this tag to auto-close. don't push it onto the stack.
			autoclose=true
			tag="${2%/}"
			tag="${1%/}"
			;;
		*) # begin a tag and push it onto the stack.
			tag="$2"
			tag="$1"
			push "$tagstack" "$tag"
			;;
	esac

	shift 2
	shift
	parseterms "$@" # parse the rest of the arguments

	if "$autoclose" && [ -z "$text" ]; then