Closed sdarwin closed 2 years ago
Lexer::create
was documented as being internal.
But. Do you actually need this code? Since #225, pygments.rb automatically picks up lexers registered in Pygments via plugins. Maybe everything will work for you properly if you just remove that code?
It's a small world. Pull 225 mentions Issue 187, where literally the same code snippet using Lexer::create appears.
Do you actually need this code? if you just remove that code?
Could be an idea to try. That implies this lexer was already "registered in Pygments via plugins".
However, discussing the issue with the original developer yesterday, he might be redesigning that documentation toolchain so the error is sidestepped entirely. I will close the issue for now and re-open later if still a problem. Thanks.
That implies this lexer was already "registered in Pygments via plugins".
Yeah, but your snipped doesn't actually teach pygments how to parse. It just adds info "pretend as if you know that language". Actual parser/highlighter still has to be somehow registered in Pygments. And if it is registered, pygments.rb will automatically know about its existence.
Hi,
I am working on updating a library from python2 to python3. In the process, it's necessary to upgrade pygments.rb, since earlier versions didn't support python3.
A certain script now gives the error "undefined method 'create'". Examining the pygments.rb source code, it looks like such a method had existed, but has now been removed.
Here is the entire script that uses "create". Should a different method be used instead of that? Thanks.