Markdown (.md) datatype for Multiview
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2356 from 2003/4/10
    From: France
    Quote:

    eliot a écrit :
    Yes, as said. If you create it elsewhere, they cannot be found.


    Ok, i have found a better solution:

    Code:
    AMTD
    1
    Type text/markdown
    Name Markdown document
    Match
    PatternHint #?.(md|MD)
    Name #?.(md|MD)
    End
    Action
    Name Read Markdown file
    Event DoubleClick
    Command AMIGADOS CD >NIL:
    Command AMIGADOS cmark %sf >RAM:file.html
    Command AMIGADOS run >NIL: sys:Applications/Wayfarer/Wayfarer file:///RAM:file.html
    Flag cd source
    End
    End


    This one convert in RAM: and keep the good path to have pictures, etc. And keep the Ambient window source accessible.
  • »08.02.25 - 10:19
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2356 from 2003/4/10
    From: France
    Hello,

    i have realized a new filetype to convert Markdown files (.md) into HTML and view it in Wayfarer, it use cmark-gfm instead cmark (best results).

    Tables, UTF-8, pictures and more are supported.

    This is a new archive containing: filetype x-markdown, a HTML header (to have UTF-8 support and more) and cmark-gfm executable:

    Markdown-Viewer_1.1.lha

    Just extract the "drawers" from SYS/ to SYS:

    Thank to delete old files from old version:

    SYS:Prefs/Ambient/Filetypes/text/x-md and c:cmark (not used here)

    If you see something to improve/fix in this new version, don't hesitate to say me here.

    Thanks to Thomas Igracki for his help for the creation of the filetype.

    [ Edité par Papiosaur 20.03.2025 - 06:58 ]
  • »11.03.25 - 16:00
    Profile Visit Website