* @param {string} fullPath * @returns {string}
(fullPath)
| 33 | * @returns {string} |
| 34 | */ |
| 35 | function toCrowdinPath(fullPath) { |
| 36 | const fileName = path.basename(fullPath); |
| 37 | const isMkDocsConfig = fileName === ORIGINAL_MKDOCS_CONFIG(DEFAULT_LANGUAGE); |
| 38 | let result = `/${path.relative(LANGUAGE_ROOT, fullPath)}`; |
| 39 | if (isMkDocsConfig || result.includes('..')) { |
| 40 | return `/${isMkDocsConfig ? CROWIN_MKDOCS_CONFIG : fileName}`; |
| 41 | } |
| 42 | return result; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * @param {string} name |
no test coverage detected