Markdown filter: wrong indent for image in list

Issue #1348 open
Taodong Lu created an issue

For example:

The original Markdown is:

## Troubleshoot 
1.  Ensure you can access platform.

    ![Issue image](/en-us/troubleshoot1.png)

    If troubleshooting instructions.

    ![Trouble image](/en-us/troubleshoot3.png)

    You can run **MODE** in a local command window.

2.  Map the local COM port to the window.

After pseudo translation is done, and MarkdownFilterWriter write translation to localized file, The indent in line 8 is wrong.

## Troubleshoot 
1.  Ensure you can access platform.

    ![Issue image](/en-us/troubleshoot1.png)

    If troubleshooting instructions.

        ![Trouble image](/en-us/troubleshoot3.png)

    You can run **MODE** in a local command window.

2.  Map the local COM port to the window.

After debug at processTextUnit(ITextUnit resource) of MarkdownSkeletonWriter.java,

for line 8:

linePrefix = "    "   // 4 spaces
textunit = "    ![Trouble image](/en-us/troubleshoot3.png)"

line 2 is image too, but it is ok

linePrefix = ""   // empty
textunit = "    ![Issue image](/en-us/troubleshoot1.png)"

Comments (2)

  1. Taodong Lu reporter

    I think for image element, the TextUnit shouldn't include MarkdownLinePrefixAnnotation, because it seems token of image is full line.

  2. Log in to comment