X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/55d1c26f53d9448a4460075f3f20fa78ca097fb0..c3e47948635578e78c46417ada01b3c24ed0b91e:/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn diff --git a/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn b/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn index de9f6e5db..9f0a1d102 100644 --- a/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn +++ b/doc/bugs/wiki_links_still_processed_inside_code_blocks.mdwn @@ -1,8 +1,8 @@ -In [[markdown]] syntax, none of the other special characters get processed -inside a code block. However, in ikiwiki, [[wiki links|wikilink]] and -[[preprocessor directives|preprocessordirective]] still get processed +In [[ikiwiki/markdown]] syntax, none of the other special characters get processed +inside a code block. However, in ikiwiki, [[wiki_links|ikiwiki/wikilink]] and +[[preprocessor_directives|ikiwiki/directive]] still get processed inside a code block, requiring additional escaping. For example, `[links -don't work](#here)`, but `a [[wikilink]] becomes HTML`. --[[JoshTriplett]] +don't work](#here)`, but `a [[ikiwiki/wikilink]] becomes HTML`. --[[JoshTriplett]] Indented lines provide a good way to escape a block of text containing markdown syntax, but ikiwiki links like \[[this]] are still @@ -41,3 +41,27 @@ and have it render like: > > In the case of either bug, no, I don't have an idea of a solution yet. > --[[Joey]] + +> I've now solved a similar bug involving the smiley plugin. The code used +> there should give some strong hints how to fix this bug, though I haven't +> tried to apply the method yet. --[[Joey]] + +>> As far, as I can see, smileys bug is solved by checking for code/pre. In +>> this case, however, this is not applicable. WikiLinks/directives *should* be +>> expanded before passing text to formatter, as their expansion may contain +>> markup. Directives should be processed before, as they may provide *partial* +>> markup (eg `template` ones), that have no sense except when in the page +>> cotext. Links should be processed before, because, at least multimarkdown may +>> try to expand them as anchor-links. +>> +>> For now, my partial solution is to restrict links to not have space at the +>> start, this way in many cases escaping in code may be done in natural way +>> and not break copypastability. For example, shell 'if \[[ condition ]];' +>> will work fine with this. +>> +>> Maybe directives can also be restricted to only be allowed on the line by +>> themselves (not separated by blank lines, however) or something similar. +>> +>> --[[isbear]] + +[[!debbug 487397]]