On Jun 28, 2017, at 7:57 AM, Tony Papadimitriou <[email protected]> wrote:
>
> However, these formatting tags are displayed cluttering the display (for some
> heavily formatted pages to the point of being unreadable).
Why not use Markdown formatting then? The same source file that produces
pretty HTML is generally usable as plain text as well.
> With the filter, a cleaner view:
It feels like a violation of a separation of concerns boundary to me.
Fossil does already blur this line, doing transforms from the native data
format (e.g. Markdown, Fossil Wiki, etc.) to HTML, but I don’t see that as a
good reason why it should support an arbitrary number of other transforms.
Where’s the limit?
HTML is special because the web is special. No other output format has that
same level of privilege.
Plain text has a different order of privilege from HTML. Information should be
stored in Fossil in the most universal form, then transformed at the end user’s
computer as needed.
I view your problem as similar to storing C source code in Fossil in a Word
document. If you sometimes want plain C code and sometimes want a Word doc,
store the file in plain C form and transform it into Word as needed, not the
other way around.
> I currently use a Lua script to do this cleaning
You’ve reinvented a perfectly good wheel here. Allow me to demonstrate it
using Fossil’s own repo:
$ f wiki exp 'To Do List' | pandoc -f mediawiki -t plain
This is what I mean by “separation of concerns:” use a tool like Pandoc when
you want to transform markup formats. Fossil should provide the untouched
original or an HTML rendering, and that’s it. Leave everything else up to
format translators.
Pandoc also supports Markdown input and output, so you could strip even most of
the Markdown formatting, if you wanted.
> However, if there are tags inside a <verbatim> ... </verbatim> they should
> remain visible.
Yet another reason to leave this to specialist tools like Pandoc, in my view.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users