Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 435891

Summary: Markdown editor is duplicating headers in preview
Product: [ECD] Orion Reporter: Maciej Bendkowski <maciej.bendkowski>
Component: EditorAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 6.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Duplicated header none

Description Maciej Bendkowski CLA 2014-05-27 07:09:51 EDT
Created attachment 243528 [details]
Duplicated header

Using the on-line preview I noticed that the header is being duplicated (see attachment). A page reload resulted in multiple invalid tokens caused by string literals, e.g. the "feature" token, however the entered text is clearly a correct Markdown file.
Comment 1 Grant Gayed CLA 2014-05-27 12:51:01 EDT
I'm not able to replicate what you're seeing using the md in your screenshot, but I did encounter an error with similar md and backspacing the bullet to the header's underline line.  I suspect that the two cases would have the same root cause, so I've released a fix and am marked this report FIXED.  If you still see this problem then please reopen this report.

Commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f4d6a4a85f5b59d5f8ac024978210f050eef6d1c .
Comment 2 Maciej Bendkowski CLA 2014-05-29 11:45:03 EDT
I can still reproduce the problem. It's quite non-deterministic, but what I'm doing is creating a header, changing the caret position to ========| <-- last position. And then hitting enter followed by some text, e.g. "asd". Repeatedly forcing this steps, with possible slight changes or backspaces, results in preview errors.
Comment 3 Grant Gayed CLA 2015-03-12 11:13:31 EDT
I've tried again based on the comment 2 description and don't see this.  The styler that parses the content has gone through significant change since this report was logged, so it's quite possible that this problem has become fixed as a side-effect.  Without a case that's observable it's difficult to investigate this further.

Closing report as WORKSFORME, but of course can be reopened if this is observed to still happen in our latest.