summaryrefslogtreecommitdiffstats
path: root/application/libraries/Pygments.php
AgeCommit message (Collapse)AuthorFilesLines
2015-05-28Improve running of external commandsFlorian Pritz1-4/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-05-28Execute scripts directlyFlorian Pritz1-1/+1
No need to specify the interpreter twice. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-11Fix missing lexers in get_lexersFlorian Pritz1-2/+2
Broken by a11e06d4906c2e1186779b42d5e87a17f66c50ea which changed names back to a normal array. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-09Fix mime2lexer failing when using pygments infoFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-02Pygments: Add .lhs extensionFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-02Improve performance of pygments->mime2lexerFlorian Pritz1-5/+3
Normal arrays are rather slow when accessed sequentially. Use associative arrays and key lookups to reduce the render time of a multipaste with 180 items from 225ms to ~190ms. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-02Pygments::get_pygments_info: cache in memoryFlorian Pritz1-1/+1
It's used multiple times if we are rendering a multipaste so it makes sense not to run to the backend cache each time (if there even is one). This reduced the render time for a multipaste with 180 items from >500ms to ~225ms when using the file cache backend. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-02Fix automatic highlight of svg filesFlorian Pritz1-7/+7
They should not be highlit.. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Get supported mimetypes from pygments itselfFlorian Pritz1-0/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Refactor \libraries\Pygments::get_lexersFlorian Pritz1-4/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-04-01Refactor lexer code into dedicated classFlorian Pritz1-0/+206
Signed-off-by: Florian Pritz <bluewind@xinu.at>