Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-59362

Confluence "{code}" block does not support Prolog syntax highlighting

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Editor - Core
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      The Confluence "code" block does not support Prolog. Please add it (not sure how difficult that is though; or is there a way to wire up one's own?).

      Inappropriate syntax highlighting ensues and one has to manually set the style to "plain text" (because the widget's attempt at doing something useful fails), or maybe "Erlang" which is kinda, sorta similar.

      Example (here, in Jira, but I suppose the underlying widget is the same as the one in Confluence. The style is set to "java".
       
      From https://rosettacode.org/wiki/100_doors#Prolog

       main :-
          forall(between(1,100,Door), ignore(display(Door))).
       
      % show output if door is open after the 100th pass
      display(Door) :-
          status(Door, 100, open),
          format("Door ~d is open~n", [Door]).
       
      % true if Door has Status after Pass is done
      status(Door, Pass, Status) :-
          Pass > 0,
          Remainder is Door mod Pass,
          toggle(Remainder, OldStatus, Status),
          OldPass is Pass - 1,
          status(Door, OldPass, OldStatus).
      status(_Door, 0, closed).
       
      toggle(Remainder, Status, Status) :-
          Remainder > 0.
      toggle(0, open, closed).
      toggle(0, closed, open).

       

              Unassigned Unassigned
              5d8283bba822 David Tonhofer
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: