JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
706 stars 78 forks source link

Correct auto-link lexing to stop at `<`. #129

Closed piotrtomiak closed 1 year ago

piotrtomiak commented 1 year ago

This fixes issue https://youtrack.jetbrains.com/issue/WEB-62513. I've checked with GitHub directly and < are indeed a stop for auto-link generation. Once merged, please release 0.5.1, so that I can include it in IJ build.

hurricup commented 1 year ago

This will have merge conflict with https://github.com/JetBrains/markdown/pull/127

hurricup commented 1 year ago

We could probably use JFlex 1.9.2 and adjust type a bit

piotrtomiak commented 1 year ago

@hurricup It would be great to add this changes to the JFlex-to-Kotlin plugin on code conversion, so that there is as little manual changes as possible. I don't think there should be any hand-made changes done to the generated lexer code. I can recreate the lexer code with JFlex 1.9.2 if that helps.

hurricup commented 1 year ago

@piotrtomiak how does this work? You just generate java and convert code by IDE?

FirstTimeInForever commented 1 year ago

@piotrtomiak We are hoping to see the bitset changes in the JFlex at some point.

FirstTimeInForever commented 1 year ago

@piotrtomiak @hurricup I've been working on an automated lexer generation + conversion to multiplatform during gradle build, however, it is not fully ready yet. Until then, we will unfortunately have to do all the stuff manually by hand.

hurricup commented 1 year ago

@FirstTimeInForever it is in 1.9.2

FirstTimeInForever commented 1 year ago

OK, let's merge the bitset changes first, then auto links with regenerated lexer.

piotrtomiak commented 1 year ago

@piotrtomiak how does this work? You just generate java and convert code by IDE?

Yes, the process is described in the readme file :)

piotrtomiak commented 1 year ago

@hurricup - will you update grammar-kit plugin to use 1.9.2 ?

hurricup commented 1 year ago

@piotrtomiak didn't plan to. Will create an issue. however, GK gradle plugin is updated already, probably time to use it here. At least as separate task.

hurricup commented 1 year ago

Or, you can replace artifact downloaded by the plugin (1.9.1) with the proper one (1.9.2) to regen manually.

piotrtomiak commented 1 year ago

@FirstTimeInForever - thanks for merging the change! When do you plan to release the new version of the library? The regression is present in 2023.2 and it would be great to have it fixed in 2023.2.3

FirstTimeInForever commented 1 year ago

@piotrtomiak I'm releasing a snapshot version rn. I'll need to test the snapshot and when release the stable version. Hopefully it won't take longer than a day.