mirror of
https://github.com/fmhy/edit.git
synced 2025-08-03 09:42:14 +10:00
Update
- Labelled PowerShell platforms. - Updated regex. - Fixed an edge case.
This commit is contained in:
parent
19e47cbf7d
commit
d1c18a572e
3 changed files with 7 additions and 7 deletions
|
@ -317,31 +317,31 @@ const transformLinks = (text: string): string =>
|
|||
// Platform indicators
|
||||
{
|
||||
name: 'Windows',
|
||||
find: /(?<=\/ (?:\/>|[^/])*)(\b(,\s*)?Windows,?\s*\b)(?=(?:\/>|[^/])* \/)/gm,
|
||||
find: /(?<=\/ (?:\/>|[^/])*)((,\s*)?Windows,?\s*)(?=(?:\/>|[^/])* \/)/gm,
|
||||
replace:
|
||||
' <div alt="Windows" class="i-qlementine-icons:windows-24" /> '
|
||||
},
|
||||
{
|
||||
name: 'Mac',
|
||||
find: /(?<=\/ (?:\/>|[^/])*)(\b(,\s*)?Mac,?\s*\b)(?=(?:\/>|[^/])* \/)/gm,
|
||||
find: /(?<=\/ (?:\/>|[^/])*)((,\s*)?Mac,?\s*)(?=(?:\/>|[^/])* \/)/gm,
|
||||
replace:
|
||||
' <div alt="Mac" class="i-qlementine-icons:mac-fill-16" /> '
|
||||
},
|
||||
{
|
||||
name: 'Linux',
|
||||
find: /(?<=\/ (?:\/>|[^/])*)(\b(,\s*)?Linux,?\s*\b)(?=(?:\/>|[^/])* \/)/gm,
|
||||
find: /(?<=\/ (?:\/>|[^/])*)((,\s*)?Linux,?\s*)(?=(?:\/>|[^/])* \/)/gm,
|
||||
replace:
|
||||
' <div alt="Linux" class="i-fluent-mdl2:linux-logo-32" /> '
|
||||
},
|
||||
{
|
||||
name: 'Android',
|
||||
find: /(?<=\/ (?:\/>|[^/])*)(\b(,\s*)?Android,?\s*\b)(?=(?:\/>|[^/])* \/)/gm,
|
||||
find: /(?<=\/ (?:\/>|[^/])*)((,\s*)?Android,?\s*)(?=(?:\/>|[^/])* \/)/gm,
|
||||
replace:
|
||||
' <div alt="Android" class="i-material-symbols:android" /> '
|
||||
},
|
||||
{
|
||||
name: 'iOS',
|
||||
find: /(?<=\/ (?:\/>|[^/])*)(\b(,\s*)?iOS,?\s*\b)(?=(?:\/>|[^/])* \/)/gm,
|
||||
find: /(?<=\/ (?:\/>|[^/])*)((,\s*)?iOS,?\s*)(?=(?:\/>|[^/])* \/)/gm,
|
||||
replace:
|
||||
' <div alt="iOS" class="i-simple-icons:ios" /> '
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue