| ... | @@ -15,7 +15,6 @@ const INLINE_CODE_DISQUALIFIER_PATTERN = /[\s`]/; | ... | @@ -15,7 +15,6 @@ const INLINE_CODE_DISQUALIFIER_PATTERN = /[\s`]/; |
| 15 | const PATH_SEPARATOR_PATTERN = /[\\/]/; | 15 | const PATH_SEPARATOR_PATTERN = /[\\/]/; |
| 16 | const FILE_EXTENSION_PATTERN = /\.[A-Za-z0-9_-]+$/; | 16 | const FILE_EXTENSION_PATTERN = /\.[A-Za-z0-9_-]+$/; |
| 17 | const NUMERIC_DOTTED_PATTERN = /^\d+(?:\.\d+)+$/; | 17 | const NUMERIC_DOTTED_PATTERN = /^\d+(?:\.\d+)+$/; |
| 18 | const BARE_EXTENSIONLESS_POSITION_PATTERN = /^[A-Za-z0-9_-]+(?::\d+){1,2}$/; | | |
| 19 | // Standard OS and dev-container roots; deliberately excludes app-route-ish | 18 | // Standard OS and dev-container roots; deliberately excludes app-route-ish |
| 20 | // prefixes like /app/ or /chat/ so SPA routes never read as files. | 19 | // prefixes like /app/ or /chat/ so SPA routes never read as files. |
| 21 | const POSIX_FILE_ROOT_PREFIXES = [ | 20 | const POSIX_FILE_ROOT_PREFIXES = [ |
| ... | @@ -152,14 +151,6 @@ function looksLikeHostname(segment: string, hasPosition: boolean): boolean { | ... | @@ -152,14 +151,6 @@ function looksLikeHostname(segment: string, hasPosition: boolean): boolean { |
| 152 | return !hasPosition && COUNTRY_HOSTNAME_TLDS.has(lastLabel); | 151 | return !hasPosition && COUNTRY_HOSTNAME_TLDS.has(lastLabel); |
| 153 | } | 152 | } |
| 154 | | 153 | |
| 155 | /** Recognizes conventional extensionless filenames with an explicit line position. */ | | |
| 156 | export function isConventionalFilePosition(path: string): boolean { | | |
| 157 | return ( | | |
| 158 | BARE_EXTENSIONLESS_POSITION_PATTERN.test(path) && | | |
| 159 | EXTENSIONLESS_FILE_NAMES.has(path.replace(POSITION_SUFFIX_PATTERN, "")) | | |
| 160 | ); | | |
| 161 | } | | |
| 162 | | | |
| 163 | /** | 154 | /** |
| 164 | * Picks path-shaped inline code for the client's markdown file-link resolver. | 155 | * Picks path-shaped inline code for the client's markdown file-link resolver. |
| 165 | * It does not resolve paths or turn plain prose and fenced code into links. | 156 | * It does not resolve paths or turn plain prose and fenced code into links. |