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

Different rendering in markdown preview and browser #43

Open
ghag opened this issue Dec 31, 2017 · 2 comments
Open

Different rendering in markdown preview and browser #43

ghag opened this issue Dec 31, 2017 · 2 comments

Comments

@ghag
Copy link

ghag commented Dec 31, 2017

As a nextcloud beginner I'm not sure if this is my own handling error...
Some markups are correctly displayed in markdown preview, but not in browser's window and vice versa. I've marked two distinctive examples in the screenshots: a picture from /assets folder (red) and a prezi video-link (yellow).

nextcloud pico_cms-editorpreviewbrowser

@PhrozenByte
Copy link
Collaborator

Pico CMS for Nextcloud v1.0.0 is arriving and I'm currently working through some old issues that can be resolved before releasing the app's first stable release. See help.nextcloud.com for more info.

Unfortunately we can't really do anything about this. Perhaps the most serious problem of Markdown is, that it never really was standardized. The only common denominator of all Markdown parsers is a descriptive document from John Gruber and his original Markdown.pl parser as some sort of a reference parser. His description of Markdown is very ambiguous, partially even contradicts itself and even the reference parser violates its own rules in many ways. The result is, that all Markdown parsers behave more or less differently - especially in cases which aren't really covered by John Gruber's document or in cases in which Markdown.pl produces impractical results.

There were some efforts being made to unify the Markdown syntax (called CommonMark), but only very few actually adapted CommonMark yet. So the issue persists...

I'll keep this issue open for future consideration.

@doftnet
Copy link

doftnet commented Jan 3, 2020

For whatever it's worth, my approach to this has been to create all my sites in a /sites folder such that the base URL of the site matches the Nextcloud path - i.e my test site exists in the Nextcloud folder /sites/test and has a base URL of /sites/test. Within the editor, I don't use the %base_url% substitution, but rather the full Nextcloud path for the file. it renders fine in the preview and on the site.

This is obviously a workaround to make the markdown editor play nice with both Nextcloud and Pico CMS, but I think the solution for this problem would probably require some modifications to the markdown editor rather than Pico in terms of telling the editor what the %base_url% should translate to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants