chore: Lint shared directory
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
// @flow
|
||||
import emojiRegex from 'emoji-regex';
|
||||
import unescape from './unescape';
|
||||
import emojiRegex from "emoji-regex";
|
||||
import unescape from "./unescape";
|
||||
|
||||
export default function parseTitle(text: string = '') {
|
||||
export default function parseTitle(text: string = "") {
|
||||
const regex = emojiRegex();
|
||||
|
||||
// find and extract title
|
||||
const firstLine = text.trim().split(/\r?\n/)[0];
|
||||
const trimmedTitle = firstLine.replace(/^#/, '').trim();
|
||||
const trimmedTitle = firstLine.replace(/^#/, "").trim();
|
||||
|
||||
// remove any escape characters
|
||||
const title = unescape(trimmedTitle);
|
||||
|
Reference in New Issue
Block a user