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

Umlauts causing error on build #81

Open
sgaechter opened this issue Jan 12, 2022 · 7 comments
Open

Umlauts causing error on build #81

sgaechter opened this issue Jan 12, 2022 · 7 comments

Comments

@sgaechter
Copy link

sgaechter commented Jan 12, 2022

Umlauts, as common in German Language (like: ä, ö, ü) causing problems buildung Sphinx Docs. The infected Charts are replaced by "Syntax error in graph mermaid version 8.13.7":

Error Message displayed in Doc:
Error

As soon as all umlauts are replaced, the graphs will be displayed as expected.
Tested make commands: html, latexpdf

Example:

`.. mermaid::

flowchart LR
a(Kundeninput) --> b(Product-Backlog) --> c(Sprintplanung) --> e("Sprint (2-4 Wochen)") --> f(Sprint-Review) --> g([Zum Veröffentlichungsprozess])
e --> d(Sprint-Retrospektive) --> c`

When I build the mermaid chart with mermaid-cli the umlauts are built correct (see output.png below):
output

used version: Master (a6c1f8b)

@mgaitan
Copy link
Owner

mgaitan commented Aug 28, 2022

I've tested this and looks ok

image

@mgaitan mgaitan closed this as completed Aug 28, 2022
@sgaechter
Copy link
Author

@mgaitan The Screenshot with the diagram you see in my Post is not the result in the rendered sphinx doc. I've rendered this with the online tool. Mermaid still throws an error and only the Error - Placeholder is shown in the doc.

@mgaitan
Copy link
Owner

mgaitan commented Sep 1, 2022

@sgaechter the screenshot I've posted was after copying/pasting your diagram code in a .rst file and then building html with sphinx. Is it not the issue reported?
In such a case, could you share an online example of a source and the produced html

@mgaitan mgaitan reopened this Sep 1, 2022
@sgaechter
Copy link
Author

@mgaitan I tested the output again. Unfortunately, either the HTML or latexpdf is rendered correctly on my side:
Source
meermaid sourcecode
HTML:
meermaid-Chart html

latexpdf:
meermaid-Chart latexpdf

as soon as I replace the umlaut "ö" to "oe " the rendering works as expected:
HTML:
mermaid-Chart html_noumlauts

latexpfdf
mermaid-Chart latexpdf_noumlauts

Attached you can find the full source code of the sphinx-Project. I'd be pleased if somebody can tell me what's wrong.
source.zip

Used versions in requirements.txt

Thanks
Sven
source.zip

@sgaechter
Copy link
Author

I've tested to set the Word with umlauts in Colons: g(["Zum Veröffentlichungsprozess"]).
This resulted in the output no longer bringing an error. However, the character encoding does not seem to be correct:
HTML:
meermaid-Chart_html_colon

latexpdf:
meermaid-Chart html_colon

I also added the directive source_encoding = 'utf-8-sig' to config.py, with no effect.

@sgaechter
Copy link
Author

Issue still open also with latest release.

@cstmth
Copy link

cstmth commented Jul 13, 2024

This is still a problem. The following line in a sankey-beta diagram causes a Diagram syntax error:

Kein Angebot, hätte angenommen, 3

Error: Error: Parse error on line 17: ...t, 1Kein Angebot, hätte angenommen, 3 ----------------------^ Expecting 'NEWLINE', 'EOF', 'COMMA', got 'NON_ESCAPED_TEXT'

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

3 participants