Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
4.0
-
Xwiki 9.6/9.7, syntax highlighting application 4.0
-
N/A
-
N/A
-
Description
Assuming the following code:
{{python}} square = 1 pennies = 1 while square <= 64: print "Square: %s Pennies: %s" % (square, square) if square == 1: quantity = "penny" else: quantity = "pennies" print "As of square %s you have %s %s." % (square, pennies, quantity) print "" square += 1 pennies += square {{/python}}
Highlighting works (in the wiki/code view), but parsing the script fails. Change the first line (square) to have no leading spaces, and the entire script 'vanishes'. Remove the extra spaces from the rest of it, and it will work again, but you won't be able to see the script without juggling through views to confuse the highlighter.
As ruby is also tab/space delimited, ruby will most likely break with the same constraint. Looking at the documentation, all of the examples show the 2 spaces initial padding inside the code macro.
Attachments
Issue Links
- is duplicated by
-
XWIKI-14911 Impossible to write Python code in wiki editor
- Closed
-
WIKIEDITOR-44 Upgrade to CodeMirror 5.13.2
- Closed