diff --git a/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh b/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh index 38b4676..72b065b 100644 --- a/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh +++ b/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh @@ -1,11 +1,11 @@ #!/bin/bash # -# tuneup_xhtml_doHeadings.sh -- This functionality transforms web page -# headings to make them accessible through a table of contents. The -# table of contents is expanded in place, wherever the
piece of code be in the page. Once the piece of code has be expanded, there is no need -# to put anything else in the page. +# xhtml_makeToc.sh -- This functionality transforms web page headings to +# make them accessible through a table of contents. The table of +# contents is expanded in place, wherever the +# piece of code be in the page. Once the +# piece of code has be expanded, there is no need to put anything else +# in the page. # # In order for the tuneup functionality to transform headings, you # need to put headings in just one line using one of the following @@ -41,12 +41,11 @@ # $Id$ # ---------------------------------------------------------------------- -function tuneup_xhtml_doHeadings { +function xhtml_makeToc { # Define variables as local to avoid conflicts outside. local COUNT=0 local PREVCOUNT=0 - local PATTERN='' local -a FINAL local -a TITLE local -a MD5SM @@ -56,9 +55,16 @@ function tuneup_xhtml_doHeadings { local -a TOCENTRIES local -a LINK + # Define table of content configuration file, the file used to + # produce the table of content XHTML output code. + local TOC_CONFIG=${TUNEUP_BACKEND_CONFIG}/$(cli_getRepoName ${TUNEUP_BACKEND} -f)_toc.awk + + # Verify table of content configuration file. + cli_checkFiles ${TOC_CONFIG} + # Define html heading regular expression pattern. Use parenthisis # to save html action name, action value, and heading title. - PATTERN="