wiki-v1 icon indicating copy to clipboard operation
wiki-v1 copied to clipboard

Markdown parsing issue with brackets and escape charactors

Open mottersen opened this issue 8 years ago • 5 comments

Actual behavior

The following code documentation will throw an error and also not allow the page to be moved to a different location within the wiki. The string in the brackets can be anything: {<anystring>}

If any charactor is added after the curly brackets, it's parsed and displayed correctly: {<anystring>}.getSomething or {<anystring>}w

While testing this, we also found that escape charactors created even more problematic behavior. If two backslashes are used to try and escape charactors, the page won't load in the browser. \{<anystring>\}

Expected behavior

Code blocks should parse content similar to the above examples without issue. When testing in another markdown wiki, this behavior worked as expected.

Steps to reproduce the behavior

See above for examples.

mottersen avatar Nov 29 '17 18:11 mottersen

Any news about escaping these characters ?

y0no avatar Feb 20 '18 09:02 y0no

I've been having issues with these, and some of my pages require the use of {strings in brackets}. Any update?

nbanmp avatar Feb 23 '18 18:02 nbanmp

This is caused by the {} being used to defined blockquotes. You can disable this behavior by removing this line: https://github.com/Requarks/wiki/blob/master/server/libs/markdown.js#L58

However, you will not be able to use custom color blockquotes.

NGPixel avatar Feb 23 '18 23:02 NGPixel

I'm having the same issue with \[anystring\] in codeblocks. Example: \[example\] outputs as: example

Really annoying when I need to escape things in regex. Is there a possibility to have an option to bypass all markdown when in code-blocks?

IanTangney avatar Apr 16 '18 17:04 IanTangney

I also have the same issue when trying to use curly braces within Wiki pages. Particularly within inline code blocks.

E.g. the following snippet will cause the Wiki page to not render in the browser:

`Test\{Token\}`

tevers200 avatar Oct 01 '19 21:10 tevers200