#43  Add the ability for the blob renderers to use language rather than file extension to detect type
Commits were merged into target branch
Sierra Sinclair opened 2 years ago

I created a new utility class to allow getting the extension and the base name of the file from the file name.

I also moved the programming language detection code into its own class and refactored the markdown renderer to use that detection to tell if it should render the code.

I also modified the line of code counter to use the language detection as well.

New commits added 2 years ago
New commits added 2 years ago
Robin Shen commented 2 years ago

Thanks for the contribution. I suggest to move class ProgrammingLanguageInfoManager into package io.onedev.server.util and rename it to something else (not end with InfoManager). Info managers in OneDev are created to analyze data in database and git and store analyzed result in a key-value datastore to speed up certain operations.

New commits added 2 years ago
Sierra Sinclair commented 2 years ago

I have renamed the Class and moved it. It does make more sense in utils.

Robin Shen merged 2 years ago
Sierra Sinclair commented 2 years ago

I also realized that .psm1 was listed twice in the extensions list so I removed it.

pull request 1 of 1
Submitter Sierra Sinclair
Target dev
Source sierra/onedev-server:dev
Merge Strategy
Create Merge Commit
Watchers (3)
pull request onedev/server#43
Please wait...
Page is in error, reload to recover