Markdown various issues in OmegaT

Issue #682 new
Baldassarre Cesarano created an issue

As reference please use "https://github.com/opengl-tutorials/ogl/blob/gh-pages/beginners-tutorials/tutorial-3-matrices/index.markdown"

After starting "---" insert an empty newLine

When there are many rows starting with "> " only the first row has '> ' at beginning

Rows starting with "![]" lose it

Rows starting with "cpp" are changed in "cpp" (same for "``` glsl")

Rows starting with " cpp" (2 spaces, 3 apex, 1 space, tag) are changed with "cpp" (3 spaces, 3 apex, tag)

Starting spaces between " cpp" ... "" are not preserved

After the row "```" an extra row is added

An extra space is added before this row (for example) " {: .highlightglslvs }"

the row " Try changing..." (3 spaces after '') is changed in " Try changing..." (1 space after '')

final extra spaces are omitted (may be ok)

Starting tab char is changed in " " (3 spaces) (may be ok)

P.S.: 1) I had to change the options in OmegaT for an output in UTF8 instead of ANSI (original file is UTF8) 2) added "* .markdown" as extension

Comments (4)

  1. ysavourel

    The current Markdown filter integrated with the OmegaT filters plugin is not the latest. We need to upgrade the plugin first and see if those issues still exist.

  2. Kuro Kurosaka

    The first item (lacking quote prefix >) is tracked by issue #686.

    The rows starting with ![] is lost probably because what follows is not an URL. For example, the first one is:

    ![]({{site.baseurl}}/assets/images/tuto-3-matrix/2X3.png)
    

    {{site.baseurl}} can't start a URL. I assume some kind of pre-processor would run and replace this part with a string starting with http:// or relative path "myportal" etc. Markdown filter can consume the actual Markdown file after preprocessing.

    The other items listed are mostly about changing the number spaces and empty lines, which is tracked by issue #687. I would like to add that preserving spaces is not the goal of the filter in general. The HTML filter doesn't preserve spaces in most cases because spaces are usually not significant in the HTML document. In Markdown, these two documents are rendered exactly the same, for example:

    Hello, World!
    
      Hello, World!
    

    Up to three leading spaces don't change the meaning of the Markdown document. So the filter implementation may choose to remove these extra spaces for efficiency.

    But the four leading spaces mean start of the code block, and it is an error if Markdown filter changes the number of leading spaces. (Issue #704)

  3. Log in to comment