418068793f
This is basically a rewrite of big parts of the parser, introducing a lot of breaking changes. The parser was originally written mostly as an exercise for myself and not really aimed as-is for practical usage. An adapted version has been used in Akkoma, however, and this pointed out serious flaws in how MFM was done in general on the fediverse. This was discussed [on the Foundkey issue tracker](FoundKeyGang/FoundKey#343) and a better way was decided. At the time of writing, this is being formalised into [FEP-c16b](https://codeberg.org/fediverse/fep/src/branch/main/fep/c16b/fep-c16b.md). This commit rewrites this parser to be FEP-c16b compliant. Previously, the parser had knowledge of the specific MFM functions. This was useful for setting default attribute values and adding specific CSS. This is not the case any more. The parser has no knowledge of specific MFM functions any more. It also had an understanding of the concept of newlines, this isn't the case any more either. It only does a "simple" translation from MFM function notation to FEP-c16b compliant HTML. Because of this, we also don't add CSS any more. It's up to the software who uses this HTML to decide what functions they want to provide and use the correct CSS. In practice the CSS from this parser was never used in Akkoma, so it's not really a loss.
28 lines
579 B
Elixir
28 lines
579 B
Elixir
defmodule MfmParser.MixProject do
|
|
use Mix.Project
|
|
|
|
def project do
|
|
[
|
|
app: :mfm_parser,
|
|
version: "0.2.0",
|
|
elixir: "~> 1.13",
|
|
start_permanent: Mix.env() == :prod,
|
|
deps: deps()
|
|
]
|
|
end
|
|
|
|
# Run "mix help compile.app" to learn about applications.
|
|
def application do
|
|
[
|
|
# extra_applications: [:logger]
|
|
]
|
|
end
|
|
|
|
# Run "mix help deps" to learn about dependencies.
|
|
defp deps do
|
|
[
|
|
# {:dep_from_hexpm, "~> 0.3.0"},
|
|
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
|
|
]
|
|
end
|
|
end
|