Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.kotcrab.remark:remark will be archived #2214

Open
rgrunber opened this issue Sep 6, 2022 · 4 comments
Open

com.kotcrab.remark:remark will be archived #2214

rgrunber opened this issue Sep 6, 2022 · 4 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@rgrunber
Copy link
Contributor

rgrunber commented Sep 6, 2022

As per kotcrab/remark-java#4 , https://github.com/kotcrab/remark-java will be archived.

It's also used by the XML language server to convert HTML to Markdown. Are there any actively maintained alternatives or will we end up just forking it in some other repo ?

CC @testforstephen , @fbricon

Update : Maybe https://github.com/IBM/MDfromHTML ?

Update 2 : remark depends on jsoup, which is vulnerable to GHSA-gp7f-rwcx-9369 . However, in our case, Javadoc don't use javascript: do they ?

@rgrunber rgrunber added the dependencies Pull requests that update a dependency file label Sep 6, 2022
@fbricon
Copy link
Contributor

fbricon commented Sep 7, 2022

We should explore alternatives, I don't really want to maintain a whole other library. https://github.com/vsch/flexmark-java might be interesting. Others might fit too.

@fbricon
Copy link
Contributor

fbricon commented Sep 7, 2022

MDFromHTML likely doesn't have @NikolasKomonen's fixes. You'd have to check and port them if necessary.

@datho7561
Copy link
Contributor

datho7561 commented Sep 8, 2022

I tried using flexmark-java in lemminx:

  • It's not a drop-in replacement; there were some differences in how the library handled links, and sometimes it would add whitespace at the end of lines. This meant the unit tests failed. However, the difference isn't that noticeable from within VS Code, so I think we could just modify the unit tests to the new behaviour.
  • The lemminx uber went from 8.2MB to 9.5MB; it looks like the library with its dependencies is around 1.5 MB
  • It looks like we were using reflection to modify the settings jsoup used to clean the HTML; it wasn't obvious how we would do this using flexmark-java

@fbricon
Copy link
Contributor

fbricon commented Nov 17, 2023

My experiments using flexmark in lemminx are rather positive so far, except it doesn't run in binary mode yet.

Anyways, this doesn't concern jdt.ls, so I will port my code here.

It's annoying it now adds ~4MB of jars, but there's no need to use some reflection hack to configure JSoup anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants