hyperlinks

extract_tag_section(html:str, tag:str)

CertainTagFinder

Extracts the HTML section corresponding to a given tag (e.g., 'TODO').
Parameters:
Returns:
str: The HTML string of the section corresponding to the tag, or
Todo:
Finish the implementation to extract the section based on the tag.
Add hyperlink to functions
Extend it to bug fix and HACK
Labels:

src_PyThon_Docy_hyperlinks_extract_tag_section

create_todo_html(tag:dict, rel_path:str)

create_todo_html

Generates HTML for a list of TODOs, each linked to its function.
Parameters:
Returns:
str: HTML string containing the TODO sections.
Examples:
>>> todo = {'calculate_area': 'Fix the calculation for negative radius', 'greet': 'Add support for multiple languages'}
>>> rel_path = 'docs/functions.html'
>>> create_todo_html(todo, rel_path)
Labels:

src_PyThon_Docy_hyperlinks_create_todo_html

create_Blue_tags(tag:str, tags:list)

create_Blue_tags

Generates HTML for a list of tags, each linked to its function.
Parameters:
Returns:
str: HTML string containing the tag sections.
Labels:

src_PyThon_Docy_hyperlinks_create_Blue_tags

fileNameExtractor(processed_files:list[dict], source_dirs:dict)

fileNameExtractor

Builds a mapping from file names to their corresponding HTML paths, grouped by language. This is later used by

replace_file_names_in_html

to hyperlink file name mentions in HTML content.
Parameters:
Returns:
dict: A nested dictionary structured as {lang: {file_name: html_path}}.
Labels:

src_PyThon_Docy_hyperlinks_fileNameExtractor

replace_file_names_in_html(html_content:str, file_name_to_html_path:dict, current_html_path:str)

replace_file_names_in_html

Replaces plain file name mentions in HTML content with relative hyperlinks to their corresponding HTML pages, except in code blocks or existing anchor tags.
Parameters:
Returns:
str: Modified HTML content with appropriate tags added.
Labels:

src_PyThon_Docy_hyperlinks_replace_file_names_in_html

process_html_for_labels(html_content:str)
Process HTML content to replace \Label tags with HTML anchors and collect all labels. This function scans the HTML for `\Label: ` patterns, replaces each with an HTML anchor (for linking), and returns the modified HTML content along with a list of the extracted labels.
Parameters:
Returns:
- labels (list[str]): List of extracted label names.
Labels:

src_PyThon_Docy_hyperlinks_process_html_for_labels

process_html_for_labels_replace(processed_files:list[dict], label_to_file:dict)
Replace \Ref tags in HTML files with hyperlinks to corresponding label anchors. For each HTML file in `processed_files`, this function reads the file, finds all `\Ref: ` tags, and replaces them with HTML links pointing to the file and anchor associated with that label (if available in `label_to_file`).
Parameters:
Labels:

src_PyThon_Docy_hyperlinks_process_html_for_labels_replace