isMatchingCodeBlockMarker checks if the trimmed line matches the opening marker
(trimmedLine string, openMarker string)
| 171 | |
| 172 | // isMatchingCodeBlockMarker checks if the trimmed line matches the opening marker |
| 173 | func isMatchingCodeBlockMarker(trimmedLine string, openMarker string) bool { |
| 174 | marker, _ := extractCodeBlockMarker(trimmedLine) |
| 175 | if marker == "" || openMarker == "" { |
| 176 | return false |
| 177 | } |
| 178 | |
| 179 | // Markers must be the same type (both backticks or both tildes) |
| 180 | if marker[0] != openMarker[0] { |
| 181 | return false |
| 182 | } |
| 183 | |
| 184 | // Closing marker must have at least as many characters as opening marker |
| 185 | return len(marker) >= len(openMarker) |
| 186 | } |