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

Change Markdown for Gitea #31

Open
mwaeckerlin opened this issue Mar 2, 2019 · 7 comments
Open

Change Markdown for Gitea #31

mwaeckerlin opened this issue Mar 2, 2019 · 7 comments

Comments

@mwaeckerlin
Copy link

mwaeckerlin commented Mar 2, 2019

The tables don't work for gitea. The following kind of tables are currently generated (example from 05_building_block_view.md):

+-----------------------+-----------------------------------------------+
| **Name**              | **Responsibility**                            |
+=======================+===============================================+
| *\<black box 1\>*     |  *\<Text\>*                                   |
+-----------------------+-----------------------------------------------+
| *\<black box 2\>*     |  *\<Text\>*                                   |
+-----------------------+-----------------------------------------------+

This is not rendered as table in gitea. The following syntax does work in gitea:

| **Name**              | **Responsibility**                            |
|-----------------------|-----------------------------------------------|
| *\<black box 1\>*     |  *\<Text\>*                                   |
| *\<black box 2\>*     |  *\<Text\>*                                   |

There may be some other minor issues, e.g. link anchors dont't work ({#target}), but te table rendering is the most annoying problem.

Please either pdate the generator for this table format or provide an additional target for gitea.

For now, I run an sed command on the template to do the changes:

cd doc/architecture
for f in *.md; do
  echo "change $f";
  sed -i '/\(\+--\+\)\+/d;/\(\+==\+\)\+/{s/\+/|/g;s/=/-/g};s/ *{#[^}]*}\+//g' $f;
done

[EDIT] Markdown for tables in Gitea seems to follow this specification.

@gernotstarke
Copy link
Member

Anybody else using gitea.io? Looks interesting, but I currently cannot estimate how widespread it's used...

@rdmueller - maybe it's interesting for docToolchain...

@rdmueller
Copy link
Member

I wonder if we should start to distribute the markdown version. with a bunch of flavour changing scripts 😁
what do you think?

@gernotstarke
Copy link
Member

good idea... Marc's (@mwaeckerlin ) script seems a good start, at least for ix* users...

@rdmueller
Copy link
Member

so, it seems that pandoc supports six markdown flavours:
https://pandoc.org/MANUAL.html#markdown-variants

We already use two of them and produce both a single- and multi-page version

@mwaeckerlin I guess you used the version found on the arc42.org download page? (the github flavoured md is afaik not linked yet)

@mwaeckerlin
Copy link
Author

@rdmueller, sorry, you asked a question. Yes your guess is correct.

@schmunk42
Copy link

@rdmueller

the github flavoured md is afaik not linked yet)

How to get the github flavoured version? Do I need to convert it by myself.

Would be great if it could also be linked.

@rdmueller
Copy link
Member

@schmunk42 you will find all formats here: https://github.com/arc42/arc42-template/tree/master/dist

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

4 participants