@@ -448,23 +448,23 @@ function render_docblock_list(docblock, docblock_name, title) {
448448# long_option_regex = "--[[:alnum:]][[:alnum:]-]*((=|[[:blank:]]+)<[^>]+>)?"
449449# pipe_separator_regex = "([[:blank:]]*\\|?[[:blank:]]+)"
450450# description_regex = "([^[:blank:]|<-].*)?"
451- #
451+ #
452452# # Build regex matching all options
453453# short_or_long_option_regex = sprintf("(%s|%s)", short_option_regex, long_option_regex)
454- #
454+ #
455455# # Build regex matching multiple options separated by spaces or pipe.
456456# all_options_regex = sprintf("(%s%s)+", short_or_long_option_regex, pipe_separator_regex)
457- #
457+ #
458458# # Build final regex.
459459# optional_arg_regex = sprintf("^(%s)%s$", all_options_regex, description_regex)
460460# ```
461- #
461+ #
462462# Final regex with non-matching groups (unsupported by gawk).
463- #
463+ #
464464# `^((?:(?:-[[:alnum:]](?:[[:blank:]]*<[^>]+>)?|--[[:alnum:]][[:alnum:]-]*(?:(?:=|[[:blank:]]+)<[^>]+>)?)(?:[[:blank:]]*\|?[[:blank:]]+))+)([^[:blank:]|<-].*)?$`
465465#
466466# @param text The text to process as an @option entry.
467- #
467+ #
468468# @set dockblock["option"] A docblock for correctly formated options.
469469# @set dockblock["option-bad"] A docblock for badly formated options.
470470function process_at_option (text ) {
@@ -764,7 +764,7 @@ in_example {
764764# Select @arg lines with content.
765765/^ [[:blank :] ]* #[[:blank :] ]+ @arg[[:blank :] ]+ [^ [:blank :] ] / {
766766 debug(" → @arg" )
767-
767+
768768 arg_text = $0
769769
770770 # Remove '# @arg ' tag.
@@ -855,9 +855,9 @@ multiple_line_docblock_name {
855855 # Check if current line indentation does match the previous line docblock item.
856856 if ($0 ~ multiple_line_identation_regex ) {
857857 debug(" → @" multiple_line_docblock_name " - new line" )
858-
858+
859859 # Current line has the same indentation as the stderr section.
860-
860+
861861 # Remove indentation and trailing spaces.
862862 sub (/^ [[:space :] ]* #[[:space :] ]+ /, " " )
863863 sub (/[[:space :] ]+ $ /, " " )
@@ -968,18 +968,18 @@ END {
968968 print render(" h1" , file_title)
969969
970970 if (file_brief != " " ) {
971- print file_brief " \n "
971+ print file_brief " \n "
972972 }
973973
974974 if (file_description != " " ) {
975975 print render(" h2" , " Overview" )
976- print file_description " \n "
976+ print file_description " \n "
977977 }
978978 }
979979
980980 if (toc != " " ) {
981981 print render(" h2" , " Index" )
982- print toc " \n "
982+ print toc " \n "
983983 }
984984
985985 print doc
0 commit comments