Bulk export (#684)
* First pass (working) collection export to zip * Add export confirmation screen * 👕 * Refactor * Job for team export, move to tmp file, settings UI * Export all collections job * 👕 * Add specs * Clarify UI
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// @flow
|
||||
import emojiRegex from 'emoji-regex';
|
||||
import unescape from './unescape';
|
||||
|
||||
export default function parseTitle(text: string = '') {
|
||||
const regex = emojiRegex();
|
||||
@@ -9,7 +10,7 @@ export default function parseTitle(text: string = '') {
|
||||
const trimmedTitle = firstLine.replace(/^#/, '').trim();
|
||||
|
||||
// remove any escape characters
|
||||
const title = trimmedTitle.replace(/\\([\\`*{}[\]()#+\-.!_>])/g, '$1');
|
||||
const title = unescape(trimmedTitle);
|
||||
|
||||
// find and extract first emoji
|
||||
const matches = regex.exec(title);
|
||||
|
||||
7
shared/utils/unescape.js
Normal file
7
shared/utils/unescape.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// @flow
|
||||
|
||||
const unescape = (text: string) => {
|
||||
return text.replace(/\\([\\`*{}[\]()#+\-.!_>])/g, '$1');
|
||||
};
|
||||
|
||||
export default unescape;
|
||||
Reference in New Issue
Block a user