File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ const { remote } = require('electron')
26
26
const { dialog } = remote
27
27
const WP_POST_PATH = '/wp/v2/posts'
28
28
29
- const matchStartingTitleNumber = new RegExp ( '^([0-9]*\.?[0-9]+).*$' )
29
+ const regexMatchStartingTitleNumber = new RegExp ( '^([0-9]*\.?[0-9]+).*$' )
30
30
31
31
function sortByCreatedAt ( a , b ) {
32
32
return new Date ( b . createdAt ) - new Date ( a . createdAt )
33
33
}
34
34
35
35
function sortByAlphabetical ( a , b ) {
36
- const matchA = matchStartingTitleNumber . exec ( a . title )
37
- const matchB = matchStartingTitleNumber . exec ( b . title )
36
+ const matchA = regexMatchStartingTitleNumber . exec ( a . title )
37
+ const matchB = regexMatchStartingTitleNumber . exec ( b . title )
38
38
39
39
if ( matchA && matchA . length === 2 && matchB && matchB . length === 2 ) {
40
40
// Both note titles are starting with a float. We will compare it now.
You can’t perform that action at this time.
0 commit comments