Bug 552231 - Underscore styling should not apply inside words
Summary: Underscore styling should not apply inside words
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.0.35   Edit
Assignee: Pierre-Yves Bigourdan CLA
QA Contact: David Green CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2019-10-18 16:13 EDT by Pierre-Yves Bigourdan CLA
Modified: 2019-11-27 02:58 EST (History)
2 users (show)

See Also:


Attachments
Documentation hovers in lsp4e (19.49 KB, image/png)
2019-10-18 16:13 EDT, Pierre-Yves Bigourdan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Yves Bigourdan CLA 2019-10-18 16:13:46 EDT
Created attachment 280341 [details]
Documentation hovers in lsp4e

When styling delimiters such as bold (**) or italic (_) are present inside words (e.g. something_like_this), most Markdown implementations ignore them; this leads to improper rendering otherwise.

The LSP4E project relies on Wikitext to display its hovers and variable names often contain underscores, which makes the documentation hard to read. I have attached an example to showcase this issue.
Comment 1 Mickael Istria CLA 2019-11-17 11:54:29 EST
@Pierre Yves: is this a bug you'd be interested to fix?
Comment 2 Pierre-Yves Bigourdan CLA 2019-11-17 14:23:45 EST
(In reply to Mickael Istria from comment #1)
> @Pierre Yves: is this a bug you'd be interested to fix?

I've got a few things on my plate at the moment, but may be able to take a look at some point. No promises though. ;)
Comment 3 Pierre-Yves Bigourdan CLA 2019-11-19 17:36:55 EST
Okay, I gave it a go and I've got an implementation working locally! I will wait for Bug 509033 to be merged before submitting a patch: as both modifications touch very similar portions of code, this may be confusing for the reviewer and cause a conflict on rebase.
Comment 4 Mickael Istria CLA 2019-11-20 10:50:52 EST
IMO, it's still better to submit a patch for this from now on rather than waiting and taking the risk of not being available to work on it later ;)
Comment 5 Eclipse Genie CLA 2019-11-20 17:28:46 EST
New Gerrit change created: https://git.eclipse.org/r/153093
Comment 6 Pierre-Yves Bigourdan CLA 2019-11-20 17:29:06 EST
(In reply to Mickael Istria from comment #4)
> IMO, it's still better to submit a patch for this from now on rather than
> waiting and taking the risk of not being available to work on it later ;)

Fair, I've submitted the patch. :)
Comment 7 Mickael Istria CLA 2019-11-26 04:07:51 EST
@Leo: any chance this patch and the other one from Pierre-Yves can be merged soon, so they get a good chance of being in 2019-09?
Comment 8 Pierre-Yves Bigourdan CLA 2019-11-26 04:17:40 EST
(In reply to Mickael Istria from comment #7)
> @Leo: any chance this patch and the other one from Pierre-Yves can be merged
> soon, so they get a good chance of being in 2019-09?

Mickael probably meant 2019-12, not 2019-09. I do agree though, this would benefit the Markdown editor/viewer shipped with every Eclipse package, but also downstream projects such as LSP4E/TM4E and the projects that depend on them. ;)
Comment 10 Leo Dos Santos CLA 2019-11-26 21:31:58 EST
(In reply to Pierre-Yves B. from comment #8)
> (In reply to Mickael Istria from comment #7)
> > @Leo: any chance this patch and the other one from Pierre-Yves can be merged
> > soon, so they get a good chance of being in 2019-09?
> 
> Mickael probably meant 2019-12, not 2019-09. I do agree though, this would
> benefit the Markdown editor/viewer shipped with every Eclipse package, but
> also downstream projects such as LSP4E/TM4E and the projects that depend on
> them. ;)

I merged this patch and added comments to the other.

I believe that this defect and the missing strikethrough arise from the fact that our Markdown implementation is true to the Daring Fireball spec https://daringfireball.net/projects/markdown/syntax and doesn't include most of the Github-flavoured Markdown or CommonMark additions. We have another CommonMark implementation in incubation, but it hasn't been developed in a long time and I'm not sure how far it got.

Since this defect and the request for strikethrough are pretty common additions to Markdown, I'm happy to take these two patches with the understanding that we're not looking to add the full CommonMark feature set!
Comment 11 Pierre-Yves Bigourdan CLA 2019-11-27 02:58:23 EST
Thanks for the insight and the review Leo!

By the way, this project doesn't seem to be importable via Oomph. It would be a great thing to setup for contributors. When trying to manually import it in the latest nightly Eclipse SDK, I ended up with thousands of errors all around the project and didn't get very far with attempting to fix them. Luckily, the few files I had to modify were error-free and the associated unit tests could be run.