A doc's home folder as its candidate (SEM7): a README or index doc was * right 26 of 30 (0.87); any other doc 5 of 30 (not stored). Markdown only. */
| 1961 | /* A doc's home folder as its candidate (SEM7): a README or index doc was |
| 1962 | * right 26 of 30 (0.87); any other doc 5 of 30 (not stored). Markdown only. */ |
| 1963 | float cbm_sem_doc_folder_p(cbm_sem_doc_format_t fmt, const char *doc_path) { |
| 1964 | if (fmt != CBM_SEM_DOC_FMT_MARKDOWN || !doc_path) { |
| 1965 | return 0.0F; |
| 1966 | } |
| 1967 | const char *base = strrchr(doc_path, '/'); |
| 1968 | base = base ? base + 1 : doc_path; |
| 1969 | const char *dot = strrchr(base, '.'); |
| 1970 | size_t n = dot ? (size_t)(dot - base) : strlen(base); |
| 1971 | bool readme = (n == sizeof("readme") - 1 && strncasecmp(base, "readme", n) == 0) || |
| 1972 | (n == sizeof("index") - 1 && strncasecmp(base, "index", n) == 0); |
| 1973 | return readme ? 0.867F : 0.0F; |
| 1974 | } |
| 1975 | |
| 1976 | cbm_sem_diag_family_t cbm_sem_diag_family(const char *format, const char *diagram_kind) { |
| 1977 | static const char *const mermaid[] = {"sequence", "class", "er", |
no outgoing calls
no test coverage detected