![]() ![]() In case you didn't know, all of your project dependencies are managed using a service called Composer. Is there a solution that's fast, requires little maintenance overhead, and can easily be reverted in the future, say once your PR is merged? Why yes. They need to find time in their busy schedules to review, comment, test, discuss and ship your PR. However, this can take time because OSS maintainers already have a lot on their plate. By creating a PR, everybody can benefit from your solution, including your future self. I will cover writing PRs for 3rd party libraries in a future post. You can also imagine that on a larger project, this could easily be missed and implemented differently in two separate locations.Īnother option, which is no doubt the best solution in the long run, is to create a PR with your fix to the original repository. However, this would cost us the elegance of simply calling $post->content and automatically being provided with renderable HTML. You would pass it a $post->body, and it would create its own GithubFlavoredMarkdownConverter, add the TorchlightExtension, and return the results. We could instead access the content via another class, like a ContentManager. Doesn't that seem overkill for one line of code though? It does to me. So, what's to be done? We could of course fork the entirety of the Wink codebase. The WinkPost lives inside the vendor folder and isn't made publicly available. The issue is, we don't have access to this code. For Torchlight to be able to add syntax highlighting to our markdown code blocks, we need to add an extension to the convertor. Now, if you're not aware, GithubFlavoredMarkdownConverter is part of the League Commonmark package, and performs the work of converting our markdown to HTML. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |