View Issue Details

IDProjectCategoryView StatusLast Update
0000454fileGeneralpublic2023-06-16 19:58
ReporterAlbrecht Assigned Tochristos  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSDebianOS VersionBookworm
Product Version5.44 
Fixed in Version5.45 
Summary0000454: C source file classified as HTML
DescriptionSome of my C source files (like the attached sample) are classified as

/tmp/sample.c: HTML document, Unicode text, UTF-8 text

if any comment contains Doxygen HTML-style links (see https://www.doxygen.nl/manual/autolink.html#linkurl). Removing the 5th line containing the link produces the expected result

/tmp/sample.c: C source, Unicode text, UTF-8 text

This is a little ugly as Doxygen is widely used for code documentation, and supports a variety of HTML commands to pimp up the output (see https://www.doxygen.nl/manual/htmlcmds.html). I didn't check if any other HTML tag command produces the same effect, though.
Steps To ReproduceSee above - just run file v. 5.44 or the latest Git version on the attached sample. Note that file 5.39 coming with Debian Bullseye correctly returns

/tmp/sample.c: C source, UTF-8 Unicode text

TagsNo tags attached.

Activities

Albrecht

2023-05-24 15:14

reporter  

sample.c (328 bytes)   
/** \file
 * \brief Sample Hello World
 * \author Albrecht Dreß <albrecht.dress@posteo.de>
 * \copyright Copyright © 2023
 * \note See \em file <a href="https://bugs.astron.com/view.php?id=4711">issue 4711</a> for details.
 */
#include <stdio.h>

int main(int argc, char **argv)
{
    printf("hello, file\n");
	return argc;
}
sample.c (328 bytes)   

christos

2023-06-16 19:58

manager   ~0003950

Fixed, by bumping strength.

Issue History

Date Modified Username Field Change
2023-05-24 15:14 Albrecht New Issue
2023-05-24 15:14 Albrecht File Added: sample.c
2023-06-16 19:57 christos Assigned To => christos
2023-06-16 19:57 christos Status new => assigned
2023-06-16 19:58 christos Status assigned => resolved
2023-06-16 19:58 christos Resolution open => fixed
2023-06-16 19:58 christos Fixed in Version => 5.45
2023-06-16 19:58 christos Note Added: 0003950