It seems that this question can also be called. I have used some reliable markdown libraries, common js and php libraries, but one problem is that the frontend and backend results are inconsistent. It seems that SF also has this problem. The frontend uses js rendering and the backend uses php. There are some slight differences between them. I know that node is used. j... it seems that this question can also be called. I have used some reliable markdown libraries, common js and php libraries, but one problem is that the frontend and backend results are inconsistent.
It seems that SF also has this problem. The frontend uses js rendering and the backend uses php. There are some slight differences between them. I know that node is used. javascript can be used both in front and back, but the problem is that I cannot change the backend language at will. Is there a good solution?
Reply content:
It seems that this question can also be called. I have used some reliable markdown libraries, common js and php libraries, but one problem is that the frontend and backend results are inconsistent.
It seems that SF also has this problem. The frontend uses js rendering and the backend uses php. There are some slight differences between them. I know that node is used. javascript can be used both in front and back, but the problem is that I cannot change the backend language at will. Is there a good solution?
You can build a Markdown Resolution Service (Node. js) API in the external environment. You just need to unify the parsing. In this way, you do not need to switch the language to achieve the effect.
Php and js proxies can interact with each other. There is an example called phpjs, which provides a lot of php base letter JavaScript implementations.
The rest is just a matter of refreshing the limit method. Simply put: port the back-end algorithm to the front-end. (The opposite is true ...)
In the past, we often encountered this problem. We have made many manual operations, but it can actually be done by a program. The js and php NLP methods are really very similar. To be honest, it is quite easy to start using them.
Not much said, someone has done: https://code.google.com/p/php-to-js/
There is also this: https://github.com/Danack/PHP-to-Javascript
If you cannot change the backend language randomly, the simplest way is to use your backend language to call Node through a process call to process the file and then read the result back.
Of course, there are some more troublesome methods ...... After the frontend and backend algorithms are unified, they are precisely implemented at the front and backend ......