pub fn detect_format_from_str(src: &str) -> BibFormatExpand description
Sniff format. Strategy: try parsing as JSON first (fast: serde_json
will reject within bytes if the leading non-whitespace is @). If
JSON parse fails, fall back to BibTeX. Note that an empty BibTeX
file (zero entries) is legal, and an empty string parses as neither
JSON nor BibTeX cleanly; we treat empty-or-whitespace-only as
BibTeX so an empty .bib round-trips correctly.