feat: route plain-text and Quarto/R Markdown files to the Markdown backend (#3161)
* feat: route plain-text and Quarto/R Markdown files to the Markdown backend Signed-off-by: Peter Staar <taa@zurich.ibm.com> * updated the README and index.md Signed-off-by: Peter Staar <taa@zurich.ibm.com> * _mime_from_extension: Added a check for extensions in the intersection of XML_USPTO and MD extension lists (currently just txt). These ambiguous extensions get pass — leaving mime=None — so the full content-probing chain (_detect_html_xhtml → _detect_csv → text/plain fallback) runs instead of prematurely assigning text/markdown. _guess_from_content: Removed the elif InputFormat.MD in formats MD fallback for text/plain content. Unrecognised .txt content now correctly returns None. MD is only returned from explicit mime types (text/markdown, text/x-markdown) which come from unambiguous extensions like .md, .text, .qmd, .rmd. Signed-off-by: Peter Staar <taa@zurich.ibm.com> * ran pre-commit Signed-off-by: Peter Staar <taa@zurich.ibm.com> --------- Signed-off-by: Peter Staar <taa@zurich.ibm.com>
P
Peter W. J. Staar committed
96d7c7ec79992d8dddedfafaaedb7f9bf6e14f40
Parent: afb4bb6
Committed by GitHub <noreply@github.com>
on 3/20/2026, 3:38:16 PM