@@ -228,7 +228,7 @@ function parse_variable_name(whole_line_string, #locals
228228 return variable_name
229229}
230230
231- # this is the key function (FIXME: make the debugging code less intrusive)
231+ # it would be nice to make the debugging code less intrusive
232232function associate_data_with_anchor (anchor_name ,
233233 anchors ,
234234 anchors_index ,
@@ -588,11 +588,17 @@ function display_anchor_with_data(anchor, description, section, len_anchors, #lo
588588}
589589
590590function count_numb_double_colon (new_target , #locals
591- counter , target , target_split , key ) {
591+ counter , target , wip_target_split , target_split , key ) {
592+ split (WIP_TARGET, wip_target_split, DOUBLE_COLON_SEPARATOR)
593+ if (wip_target_split[ 1 ] == new_target) {
594+ # if we are still dealing with the WIP target, return its index
595+ return wip_target_split[ 2 ]
596+ }
597+
592598 counter = 1
593599 for (key in TARGETS) { # order is not important
594600 target = TARGETS[ key]
595- split (target, target_split, " ~ " )
601+ split (target, target_split, DOUBLE_COLON_SEPARATOR )
596602 if (target_split[ 1 ] == new_target) {
597603 counter++
598604 }
@@ -837,7 +843,7 @@ function initialize_colors() {
837843 ansi_color_param_to_html_style(" BG" , " BG" ))
838844 } else if (OUTPUT_FORMAT == " LATEX" ) {
839845 LATEX_FOOTER = " \\ end{alltt}\n\\ end{varwidth}\n\\ end{document}"
840- # FIXME: I don't see a better way to store this
846+ # Is there a better way to store this?
841847 LATEX_HEADER = sprintf (" \\ documentclass{article}\n\\ usepackage[utf8]{inputenc}\n\\ usepackage{xcolor}\n\\ usepackage{alltt}\n\\ usepackage[top=0cm, bottom=0cm, left=0cm, right=0cm]{geometry}\n\\ usepackage{varwidth}\n\\ usepackage[active,tightpage]{preview}\n\\ usepackage[normalem]{ulem}\n\n\\ setlength{\\ fboxsep}{0pt}\n\n\\ newcommand{\\ bgcolor}[2]{\\ colorbox{#1}{\\ vphantom{Ay}#2}}\n\n\\ PreviewEnvironment{varwidth}\n\n %s%s\\ definecolor{color-attention}{HTML}{%s}\n\\ definecolor{color-section}{HTML}{%s}\n\\ definecolor{color-deprecated}{HTML}{%s}\n\\ definecolor{color-default}{HTML}{%s}\n\\ definecolor{color-warning}{HTML}{%s}\n\\ definecolor{color-backticks}{HTML}{%s}\n\n\\ pagestyle{empty}\n\\ begin{document}\n\n\\ begin{varwidth}{\\ linewidth}\n %s%s\n\\ begin{alltt}" ,
842848 ansi_color_param_to_latex_color(" FG" , 1 ),
843849 ansi_color_param_to_latex_color(" BG" , 1 ),
0 commit comments