Language Identification for Program Code in Documents | AMiner
Language Identification for Program Code in Documents
Steven J. DeRose
Balisage Series on Markup Technologies Proceedings of Balisage The Markup Conference 2025
被引用0|浏览0
摘要
This paper proposes a simple approach to labelling the language of programming code embedded in structured documents, using standard language attributes (such as xml:lang and HTML lang ) with a single reserved language code qpr , and specific programming languages and/or data formats distinguished via the following portion. This approach facilitates language-specific processing including syntax highlighting, spell checking, and validation while maintaining backward compatibility with existing document processing systems.