Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Djot is a light markup syntax (djot.net)
3 points by thunderbong on July 2, 2023 | hide | past | favorite | 1 comment


Djot is the markup syntax that is used for the documentation of Scryer Prolog, using a parser written in Prolog:

https://github.com/aarroyoc/djota

It works well so far. One of the few limitations I noticed so far pertains to the formatting of tables. For instance, consider the table used in library(format) to describe control sequences:

https://github.com/mthom/scryer-prolog/blob/b0566e41503a6c8d...

It contains several entries that span multiple lines, yet are meant to denote only a single row of the table, such as:

    % | `~Nr`    |  where N is an integer between 2 and 36: format the            |
    % |          |  next argument, which must be an integer, in radix N.          |
    % |          |  The characters "a" to "z" are used for radices 10 to 36.      |
    % |          |  If N is omitted, it defaults to 8 (octal).                    |
It appears that Djot requires to write the entire entry in one long line, otherwise it gets formatted as shown currently at:

https://www.scryer.pl/format.html

From a readability perspective in the source file itself, a very long line is suboptimal. Maybe there is a way to retain optimal readability in the source file, and still get the intended rendering?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: