Module

PuduLangDocgen.Markdown.Languages

View source

Language identities, aliases, extensions, and display names

Functions

Name Description
identify The identity of a language named by its name or an alias in any case, such as `js` or `JavaScript` for `javascript`. Unknown names answer themselves in lower case. Identities follow the language table published by the linguist project, with Pudu added.
ofPath The identity of the language a file is written in, from its exact name or its extension, or the empty text.
title The display name of a language identity, such as `JavaScript`; unknown identities answer themselves.

identify

fn identify(written: Str) -> Str

The identity of a language named by its name or an alias in any case, such as js or JavaScript for javascript. Unknown names answer themselves in lower case. Identities follow the language table published by the linguist project, with Pudu added.

Parameters

written
Str

Returns

Str

View source

ofPath

fn ofPath(path: Str) -> Str

The identity of the language a file is written in, from its exact name or its extension, or the empty text.

Parameters

path
Str

Returns

Str

View source

title

fn title(identity: Str) -> Str

The display name of a language identity, such as JavaScript; unknown identities answer themselves.

Parameters

identity
Str

Returns

Str

View source