RFC: Syntax Definition Format

Getting close on custom syntaxes. I’ve updated pre-release docs, if anyone would care to review and ask questions. The beta phase will begin in the coming weeks.

3 Likes

I’m only going to really be able to comment constructively when I’ve built a custom syntax. (I have a couple of z/OS-mainframe related ones in mind: DFSORT and JCL. (Ask your Dad about these, Greg.) :slight_smile: )

(If those work I’ll have to figure out how to upload them to my friendly local z/OS system and run them.)

The other point I’d make is that I would like to have any syntax-coloured text to have HTML/CSS class labeling on export. The excellent Codye app on iOS/iPadOS uses some standard class names, for instance. I don’t know how feasible this is.

For those interested in developing custom syntax definitions and themes, they are now in beta testing, as I’d love feedback, testing, and, of course, would love it if some examples were available at launch. Beta information below:

3 Likes

I might suggest that support for changing font families be an included part of the spec. Already, there’s handling within Drafts to support changing between monospaced and a “standard” font (which might also be monospaced). Being able to, effectively, set a third style or avoid trying to shoe-horn between mono and regular (when mono might not actually reflect the syntax’s intention) might be of benefit.

Of course there are probably good reasons against this that I haven’t considered.

Just a quick question: i have no idea how I can store a JSON file from the recommended Jayson app with the required extension „.draftsTheme“ nor did I quickly found a solution to change the extension on iOS. How is it possible to create / edit a theme on iOS?
I used my Mac to create a first test but to make small changes it would be great if using iOS would be possible

You can use .json extensions. Should work fine in development mode. Just when/if you were going to distribute them as downloadable files, you would want to change the extension so opening them would import them into Drafts.

2 Likes

The posted link is broken (at least on ios)

works for me.

1 Like

I landed here when searching for a way to simplify/convert Markdown text to include only those markers which are recognized by Whatsapp. Any one aware of a way to do this that already exists? Would this be addressed by the OP?