...
 
Commits (2)
# Changes in shell-docs-generator
## 1.6.3 (2019-02-18)
* fix shellcheck complaints
## 1.6.2 (2019-02-18)
* fix bare-links in markdown output
......
......@@ -3,7 +3,7 @@
| Tag | Value |
| - | - |
| Author | Andreas Unterkircher |
| Version | 1.6.2 |
| Version | 1.6.3 |
| License | AGPLv3 |
<!-- if a table-of-contents gets actually rendered, depends on your markdown-viewer -->
......@@ -684,4 +684,4 @@ filled by parse_input(). The output is stored in the $OUTPUT file.
| - | - |
| Type | `int` |
[^1]: Created by _shell-docs-gen.sh_ _v1.6.2_ on Mon Feb 18 20:00:22 UTC 2019.
[^1]: Created by _shell-docs-gen.sh_ _v1.6.3_ on Mon Feb 18 20:07:40 UTC 2019.
......@@ -2,7 +2,7 @@
###############################################################################
# This file is part of the shell-docs-generator v1.6.2
# This file is part of the shell-docs-generator v1.6.3
#
# shell-docs-generator, a documentation generator for shell scripts based on
# comment tags like @brief, @return, etc. that are placed in front of a
......@@ -22,7 +22,7 @@
# @title shell-docs-generator
# @author Andreas Unterkircher
# @version 1.6.2
# @version 1.6.3
# @license AGPLv3
set -u -e -o pipefail # exit-on-error, error on undeclared variables.
......@@ -41,7 +41,7 @@ readonly PROG_NAME="$(basename "${BASH_SOURCE[0]}")"
# @var PROG_VERS
# @description the scripts major and minor version numbers
readonly PROG_VERS="1.6.2"
readonly PROG_VERS="1.6.3"
# @var CODE_SRC
# @description index array, that helds the complete, read-in source code
......@@ -455,7 +455,7 @@ debug ()
is_debug || return 0
echo -e "${FUNCNAME[1]}([${BASH_LINENO[0]}]):\t${1}" >&2
echo -e "${FUNCNAME[1]}([${BASH_LINENO[0]}]):\\t${1}" >&2
}
# @function is_verbose()
......@@ -480,7 +480,7 @@ verbose ()
{
is_verbose || is_debug || return 0;
echo -e "${FUNCNAME[1]}([${BASH_LINENO[0]}]):\t${1}"
echo -e "${FUNCNAME[1]}([${BASH_LINENO[0]}]):\\t${1}"
}
readonly -f verbose
......@@ -692,8 +692,13 @@ parse_input ()
if ${IN_STANZA} && \
[[ -v "STANZA['type']" ]] && \
[[ -v "STANZA['name']" ]] && ( \
( [ "${STANZA['type']}" == 'function' ] && [[ "${LINE}" =~ ^(function[[:blank:]])?${STANZA['name']}[[:blank:]]*\(\)[[:blank:]]* ]] ) || \
( [ "${STANZA['type']}" == 'var' ] && [[ "${LINE}" =~ ^(${STANZA['name']}|(declare|readonly).+${STANZA['name']}) ]] ) ); then
{ \
[ "${STANZA['type']}" == 'function' ] && \
[[ "${LINE}" =~ ^(function[[:blank:]])?${STANZA['name']}[[:blank:]]*\(\)[[:blank:]]* ]]; \
} || { \
[ "${STANZA['type']}" == 'var' ] && \
[[ "${LINE}" =~ ^(${STANZA['name']}|(declare|readonly).+${STANZA['name']}) ]];
} ); then
if is_debug; then
debug "End of stanza located at line ${LINE_NO}. Closing it."
......@@ -1235,7 +1240,7 @@ fail ()
return 1
fi
echo -e "${FUNCNAME[1]}([${BASH_LINENO[0]}]):\t${1}"
echo -e "${FUNCNAME[1]}([${BASH_LINENO[0]}]):\\t${1}"
}
# @function output_markdown()
......