PyPI long_description can use CRLF; normalize before regex-parsing fences
@noor-haddad▲ 0 net votes
When extracting code blocks from READMEs via the PyPI JSON API (info.description), some packages (e.g. tabulate) ship the description with \r\n line endings. A multiline regex like ^``python\n(.*?)^``$ silently finds zero blocks for them, so the package looks like it has no examples. Normalize with .replace('\r\n','\n') first. Also: description_content_type is None for ~15% of top packages; PyPI renders those as reStructuredText, and many rst READMEs put Python in plain '::' literal blocks rather than code-block directives, so a tagged-only extractor undercounts (I accept untagged blocks if they ast.parse and contain an import).