Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chen3feng/cn-doc-style-guide
/ functions
Functions
67 in github.com/chen3feng/cn-doc-style-guide
⨍
Functions
67
◇
Types & classes
0
↓ 8 callers
Function
_write
(tmp_path, text, name="doc.md")
tests/test_check.py:15
↓ 1 callers
Function
_fix_punct
(text: str)
src/cndocstyle/formatter.py:90
↓ 1 callers
Function
_fix_spacing
(text: str)
src/cndocstyle/formatter.py:106
↓ 1 callers
Function
_iter_md_files
(paths)
src/cndocstyle/check.py:95
↓ 1 callers
Function
_iter_md_files
(paths)
src/cndocstyle/formatter.py:161
↓ 1 callers
Function
_protect
Replace protected spans with placeholders; return (text, restore).
src/cndocstyle/formatter.py:55
↓ 1 callers
Function
_restore
(text: str, restore: list[str])
src/cndocstyle/formatter.py:69
↓ 1 callers
Function
fix_file
Format one file. Return True if content would change.
src/cndocstyle/formatter.py:148
↓ 1 callers
Function
fix_line
Return the style-normalised form of a single markdown line.
src/cndocstyle/formatter.py:113
↓ 1 callers
Function
fix_text
Return the style-normalised form of a full markdown document.
src/cndocstyle/formatter.py:124
↓ 1 callers
Function
main
(argv=None)
src/cndocstyle/check.py:109
↓ 1 callers
Function
main
(argv=None)
src/cndocstyle/formatter.py:175
↓ 1 callers
Function
main
(argv=None)
src/cndocstyle/preview.py:33
↓ 1 callers
Function
preview
(path: str)
src/cndocstyle/preview.py:19
↓ 1 callers
Function
scan_file
(path: str)
src/cndocstyle/check.py:71
↓ 1 callers
Function
scan_line
(line: str)
src/cndocstyle/check.py:63
Function
_blank
(m)
src/cndocstyle/check.py:59
Function
_names
Extract the rule-name column from ``scan_file`` output.
tests/test_check.py:10
Function
sub
(m: re.Match)
src/cndocstyle/formatter.py:59
Function
test_collapses_multiple_spaces_between_han
()
tests/test_formatter.py:18
Function
test_converts_ascii_parens_adjacent_to_han
()
tests/test_formatter.py:50
Function
test_converts_half_width_colon_after_han
()
tests/test_formatter.py:35
Function
test_converts_half_width_comma_after_han
()
tests/test_formatter.py:31
Function
test_converts_semicolon_qmark_bang_after_han
()
tests/test_formatter.py:44
Function
test_does_not_touch_double_quote
()
tests/test_formatter.py:60
Function
test_does_not_touch_standalone_english_punct
()
tests/test_formatter.py:54
Function
test_fix_file_apply_writes_change
(tmp_path)
tests/test_formatter.py:140
Function
test_fix_file_dry_run_does_not_modify
(tmp_path)
tests/test_formatter.py:131
Function
test_fix_file_returns_false_when_clean
(tmp_path)
tests/test_formatter.py:148
Function
test_fix_text_handles_tilde_fences
()
tests/test_formatter.py:102
Function
test_fix_text_is_idempotent
()
tests/test_formatter.py:108
Function
test_fix_text_preserves_no_trailing_newline
()
tests/test_formatter.py:123
Function
test_fix_text_preserves_trailing_newline
()
tests/test_formatter.py:116
Function
test_fix_text_skips_fenced_code_block
()
tests/test_formatter.py:96
Function
test_html_tag_contents_are_protected
()
tests/test_formatter.py:85
Function
test_inline_code_is_protected
()
tests/test_formatter.py:70
Function
test_inserts_space_between_ascii_and_han
()
tests/test_formatter.py:14
Function
test_inserts_space_between_han_and_ascii
()
tests/test_formatter.py:10
Function
test_link_url_is_protected_but_label_is_not
()
tests/test_formatter.py:75
Function
test_main_apply_modifies_files
(tmp_path, capsys)
tests/test_formatter.py:166
Function
test_main_dry_run_reports_would_change_files
(tmp_path, capsys)
tests/test_formatter.py:155
Function
test_main_exclude_flag_silences_rule
(tmp_path, capsys)
tests/test_check.py:139
Function
test_main_returns_nonzero_on_dirty_file
(tmp_path, capsys)
tests/test_check.py:131
Function
test_main_returns_one_when_there_is_a_diff
(tmp_path, capsys)
tests/test_preview.py:43
Function
test_main_returns_zero_on_clean_file
(tmp_path, capsys)
tests/test_check.py:125
Function
test_main_returns_zero_when_no_diff
(tmp_path, capsys)
tests/test_preview.py:35
Function
test_main_walks_directory
(tmp_path, capsys)
tests/test_check.py:146
Function
test_main_walks_directory_recursively
(tmp_path)
tests/test_formatter.py:176
Function
test_main_with_no_args_prints_doc
(capsys)
tests/test_preview.py:53
Function
test_preserves_colon_before_double_slash
()
tests/test_formatter.py:39
Function
test_preview_does_not_modify_file
(tmp_path)
tests/test_preview.py:27
Function
test_preview_empty_for_clean_file
(tmp_path)
tests/test_preview.py:8
Function
test_preview_shows_unified_diff_for_dirty_file
(tmp_path)
tests/test_preview.py:14
Function
test_scan_file_clean_document
(tmp_path)
tests/test_check.py:116
Function
test_scan_file_handles_tilde_fences
(tmp_path)
tests/test_check.py:107
Function
test_scan_file_skips_fenced_code_blocks
(tmp_path)
tests/test_check.py:97
Function
test_scan_line_clean_input_has_no_hits
()
tests/test_check.py:89
Function
test_scan_line_colon_before_double_slash_is_ignored
()
tests/test_check.py:53
Function
test_scan_line_detects_ascii_han
()
tests/test_check.py:30
Function
test_scan_line_detects_ascii_quote
()
tests/test_check.py:69
Function
test_scan_line_detects_half_width_punct
()
tests/test_check.py:36
Function
test_scan_line_detects_han_ascii
()
tests/test_check.py:24
Function
test_scan_line_detects_multi_space
()
tests/test_check.py:64
Function
test_scan_line_detects_parens
()
tests/test_check.py:59
Function
test_scan_line_inline_code_is_ignored
()
tests/test_check.py:74
Function
test_scan_line_link_url_is_ignored
()
tests/test_check.py:80
Function
test_single_space_between_han_is_left_alone
()
tests/test_formatter.py:23