Skip to content

{@includeCode} with regions doesn't work on windows saved files (LFCR) #2902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IveGotThePawa opened this issue Mar 17, 2025 · 0 comments
Closed
Milestone

Comments

@IveGotThePawa
Copy link

Search terms

includeCode
region
windows
LFCR
end of line
\r\n
\n

Expected Behavior

{@includecode file#region} should find region even in windows saved files

Actual Behavior

inline tag {@includecode} with a filePath#region doesn't work if the target file was saved with windows end-of-line characters. The include_0_tag_in_1_specified_2_file_3_region_4_region_not_found error is always displayed.

Just check the regexes in src/lib/converter/plugins/IncludePlugin.ts

They should all be changed from *\n to *\r?\n

Steps to reproduce the bug

use a target file that has been saved with \r\n end-of-line characters.

You should also include TSX extension files, not just TS (react support)

Environment

  • Typedoc version: 0.27.9
  • TypeScript version: 5
  • Node.js version: 20
  • OS: windows
@Gerrit0 Gerrit0 added this to the v0.28.1 milestone Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants