List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: RFE: render MD/RST documents in tree view
Date: Wed, 24 Aug 2016 19:47:06 +0100	[thread overview]
Message-ID: <20160824184706.sbmjel2bjnfkzbnn@john.keeping.me.uk> (raw)
In-Reply-To: <20160824071920.GA12401@partyvan.eu>

On Wed, Aug 24, 2016 at 07:19:20AM +0000, Juuso Lapinlampi wrote:
> source-filter is good enough? I don't want cgit to become a GitLab-ish
> platform with all this featuritis.

source-filter doesn't suppress the line numbers, which render as a
separate table cell, and it wraps the content in <pre></pre>.  I'm
guessing the intent here is to avoid that.

> Do one thing and do it well; leave Markdown rendering to a seperate
> program. Nobody can really even agree to how Markdown and its quirks
> should be rendered, so we have tens of variants. CommonMark is not
> stable yet.

I don't think anyone is suggesting that, just provide a way to replace
the entire page content with a rendered version (presumably via a new
filter).

I can't immediately think of a nice way to achieve this; I think there
are two possible interfaces:

a) We decide what to do based on the MIME type of the file, and then
   invoke render-filter (for lack of a better name) where relevant

b) We always try to render the file but the filter can exit immediately
   with an error in which case we carry on with the current code

In either case we then need to provide a way to switch back to the
current source view for the file.


      reply	other threads:[~2016-08-24 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 21:37 mricon
2016-08-24  4:41 ` jea-signup-cgit
2016-08-24  8:35   ` hjemli
2016-08-24  7:19 ` wub
2016-08-24 18:47   ` john [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160824184706.sbmjel2bjnfkzbnn@john.keeping.me.uk \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).