feat(*.liquid): apply prettier to liquid templates
- offer to create tag when none is found while adding a link from cli - fix tag display in search
This commit is contained in:
parent
49e21d574e
commit
efe701f939
112 changed files with 1319 additions and 1134 deletions
|
@ -1,11 +1,11 @@
|
|||
import { transliterate } from 'transliteration';
|
||||
import { transliterate } from "transliteration";
|
||||
|
||||
export const sanitizeMediaString = (input) => {
|
||||
const ascii = transliterate(input);
|
||||
const cleaned = ascii.replace(/[^a-zA-Z0-9\s-]/g, '');
|
||||
const slugified = cleaned.replace(/[\s-]+/g, '-').toLowerCase();
|
||||
const cleaned = ascii.replace(/[^a-zA-Z0-9\s-]/g, "");
|
||||
const slugified = cleaned.replace(/[\s-]+/g, "-").toLowerCase();
|
||||
|
||||
return slugified.replace(/^-+|-+$/g, '');
|
||||
return slugified.replace(/^-+|-+$/g, "");
|
||||
};
|
||||
|
||||
export const removeUrlProtocol = (url) => (url ? url.replace(/^https?:\/\//, '') : '');
|
||||
export const removeUrlProtocol = (url) => (url ? url.replace(/^https?:\/\//, "") : "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue