Closed Mesteery closed 2 years ago
I really don't like to changes... The more I see those two parse_extension
and parse_language
functions, the more I feel like the two are dump. Maybe we should just use langtoext
and exttolang
directly in controller.py
. Also IMO we should move all that langage stuff into hightlight.py
.
The changes you did in new
are very odd, like I really don't understand why you had to change all the existing code. Also ext = DEFAULT_LANGAGE
wtf ??
The changes you did in new are very odd, like I really don't understand why you had to change all the existing code. Also ext = DEFAULT_LANGAGE wtf ??
I don't know. I don't even know if this branch is really ready, this commit has been done since many months and I don't remember much.
This would be an opportunity to rework this from scratch I think.
@Mesteery I did re-write it from scratch, there are new unittests and I also manually tested the /new route (both x-form-urlencoded and multipart). Can you review the code?
This allow to use any supported language by Pygments. These additionals languages are not displayed in the frontend.
To achieve this, highlight "utils" has been greatly refactored.
Closes https://github.com/readthedocs-fr/bin-server/issues/119