On Wednesday, 14 February 2018 at 18:33:23 UTC, Jonathan Marler wrote:
@timotheecour and I came up with a solution to a common problem:

How to represent multiple files in a forum post?

So we decided to take a stab at creating a standard! (queue links to https://xkcd.com/927)

We're calling it "har" (inspired by the name tar).

Clever name. Har D har har {ducks!} :)

Here's the REPO: https://github.com/marler8997/har and here's what it looks like:

--- file1.d
module file1;

--- file2.d
module file2;

// some cool stuff

--- main.d
import file1, file2;
void main() { }

--- Makefile
main: main.d file1.d file2.d
    dmd main.d file1.d file2.d

This looks handy.

Yes, it's easy enough in markdown docs to just put code block markers around them (such as ``` or ~~~).

Can the har file delimiter be more than three characters?

What do you think of allowing trailing dashes (or whatever the delim chars are) after the file/dir name? It would make it easier to see the delimiters for larger har'd files.

    --- file1.d -------------------
    module file1;

    --- file2.d -------------------
    module file2;

(Note that markdown allows extra trailing characters with its ATX-style headers, and Pandoc does likewise with ATX headers as well as its div syntax (delimited by at least three colons), for that very reason --- to make it easier to spot them.)

Reply via email to