← Về thư mục
skills/docx/scripts/merge_runs.py
- merge_runs · function · L40-L64 — def merge_runs(input_dir: str) -> tuple[int, str]
- _is_element · function · L69-L71 — def _is_element(node, tag: str) -> bool
- _run_tag_names · function · L74-L82 — def _run_tag_names(root) -> set[str]
- _find_elements · function · L85-L96 — def _find_elements(root, tag: str) -> list
- traverse · function · L88-L93 — def traverse(node)
- _find_runs · function · L99-L100 — def _find_runs(root, run_names: set[str]) -> list
- _get_child · function · L103-L104 — def _get_child(parent, tag: str)
- _get_children · function · L107-L112 — def _get_children(parent, tag: str) -> list
- _is_adjacent · function · L115-L125 — def _is_adjacent(elem1, elem2) -> bool
- _remove_elements · function · L130-L133 — def _remove_elements(root, tag: str)
- _strip_rsid_attrs · function · L136-L140 — def _strip_rsid_attrs(runs: list)
- _merge_runs_in · function · L145-L162 — def _merge_runs_in(container, run_names: set[str]) -> int
- _first_child_run · function · L165-L169 — def _first_child_run(container, run_names: set[str])
- _next_element_sibling · function · L172-L178 — def _next_element_sibling(node)
- _next_sibling_run · function · L181-L188 — def _next_sibling_run(node, run_names: set[str])
- _is_run · function · L191-L192 — def _is_run(node, run_names: set[str]) -> bool
- _can_merge · function · L195-L203 — def _can_merge(run1, run2) -> bool
- _merge_run_content · function · L206-L211 — def _merge_run_content(target, source)
- _element_text · function · L214-L219 — def _element_text(elem) -> str
- _has_preserve · function · L222-L223 — def _has_preserve(elem) -> bool
- _rendered_text · function · L226-L227 — def _rendered_text(elem) -> str
- _consolidate_text · function · L230-L232 — def _consolidate_text(run)
- _consolidate_text_elements · function · L235-L261 — def _consolidate_text_elements(run, tag: str)
- _merge_or_die · function · L266-L271 — def _merge_or_die(path: Path) -> str
- main · function · L274-L306 — def main() -> None