Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken markdown tables when using block macros #90

Open
dinya opened this issue Jun 20, 2020 · 0 comments
Open

Broken markdown tables when using block macros #90

dinya opened this issue Jun 20, 2020 · 0 comments

Comments

@dinya
Copy link

dinya commented Jun 20, 2020

When I use "block" macros in Markdown tables the redmine_wysiwyg_editor brokes the render.

For example let's create the markdown table (I used {{collapse}} and {{mj}} block macros, but I think there are the same problem with another ones)

Inline | Block
-------|------
Simple text | {{collapse(Hidden part)

a | b
---|---
1 | 2

}}
{{thumbnail(redmine_logo_v1.png, width=500)}} | {{mj

\begin{align}
	\cos^2 \phi + \sin^2 \phi = 1 \\
	e^{i \phi} = \cos\phi + i\sin\phi
\end{align}

}}

The table should be renderes in the "clean" Redmine as

image1

If I try to paste the above markdown code to "Markdown" tab of redmine_wysiwyg_editor and then click on "Visual editor" tab the result will be as follows

image2

but "Preview" tab content is still the same as for "clean" Redmine.

But if I try to add "Some text" in "Visual editor" then the contents of "Markdown" and "Preview" tabs will fail. For example "Markdown" tab content will become:

| Inline | Block |
| --- | --- |
| Simple text | {{collapse(Hidden part) |
| a | b |
| --- | --- |
| 1 | 2 |

}}
{{thumbnail(redmine_logo_v1.png, width=500)}} | {{mj

\begin{align}
\cos<sup>2</sup> \phi + \sin<sup>2</sup> \phi = 1 \
e<sup>{i</sup> \phi} = \cos\phi + i\sin\phi
\end{align}

}}

Some text

P.S. redmine_wysiwyg_editor replaces hats ^x with <sup>x</sup>.

I tested with:

  1. Redmine 3.4.11 (but I think the same problem exists in 4.x too)
  2. Last master redmine_wysiwyg_editor (v0.15.3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant