little changes and typos
This commit is contained in:
parent
851c5bf093
commit
08d64b977f
|
@ -57,7 +57,7 @@
|
||||||
config :pleroma, :emoji,
|
config :pleroma, :emoji,
|
||||||
shortcode_globs: ["/emoji/custom/**/*.png"],
|
shortcode_globs: ["/emoji/custom/**/*.png"],
|
||||||
groups: [
|
groups: [
|
||||||
# Place here groups, which have more priority on defaults. Example in `docs/config/custom_emoji.md`
|
# Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
|
||||||
Finmoji: "/finmoji/128px/*-128.png",
|
Finmoji: "/finmoji/128px/*-128.png",
|
||||||
Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
|
Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
|
||||||
]
|
]
|
||||||
|
|
|
@ -30,7 +30,7 @@ config :pleroma, :emoji,
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Order of the `groups` matters, so to override default tags just put your group on the top of the list. E.g:
|
Order of the `groups` matters, so to override default tags just put your group on top of the list. E.g:
|
||||||
```
|
```
|
||||||
config :pleroma, :emoji,
|
config :pleroma, :emoji,
|
||||||
shortcode_globs: ["/emoji/custom/**/*.png"],
|
shortcode_globs: ["/emoji/custom/**/*.png"],
|
||||||
|
@ -44,7 +44,7 @@ config :pleroma, :emoji,
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Priority of tag assign in emoji.txt and custom.txt:
|
Priority of tags assigns in emoji.txt and custom.txt:
|
||||||
|
|
||||||
`tag in file > special group setting in config.exs > default setting in config.exs`
|
`tag in file > special group setting in config.exs > default setting in config.exs`
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ defmodule Pleroma.Emoji do
|
||||||
use GenServer
|
use GenServer
|
||||||
|
|
||||||
@type pattern :: Regex.t() | module() | String.t()
|
@type pattern :: Regex.t() | module() | String.t()
|
||||||
@type patterns :: pattern | [pattern]
|
@type patterns :: pattern() | [pattern()]
|
||||||
@type group_patterns :: keyword(patterns)
|
@type group_patterns :: keyword(patterns())
|
||||||
|
|
||||||
@ets __MODULE__.Ets
|
@ets __MODULE__.Ets
|
||||||
@ets_options [:ordered_set, :protected, :named_table, {:read_concurrency, true}]
|
@ets_options [:ordered_set, :protected, :named_table, {:read_concurrency, true}]
|
||||||
|
@ -80,7 +80,7 @@ def code_change(_old_vsn, state, _extra) do
|
||||||
|
|
||||||
defp load do
|
defp load do
|
||||||
finmoji_enabled = Keyword.get(Application.get_env(:pleroma, :instance), :finmoji_enabled)
|
finmoji_enabled = Keyword.get(Application.get_env(:pleroma, :instance), :finmoji_enabled)
|
||||||
shortcode_globs = Keyword.get(Application.get_env(:pleroma, :emoji, []), :shortcode_globs, [])
|
shortcode_globs = Application.get_env(:pleroma, :emoji)[:shortcode_globs] || []
|
||||||
|
|
||||||
emojis =
|
emojis =
|
||||||
(load_finmoji(finmoji_enabled) ++
|
(load_finmoji(finmoji_enabled) ++
|
||||||
|
|
Loading…
Reference in New Issue