Fix bugs in Regex Memo textarea

This commit is contained in:
Nicolas Maltais-Dansereau 2020-09-13 14:42:50 -04:00
parent 8aef7e8d1e
commit 1a2abc2824
5 changed files with 46 additions and 102 deletions

View file

@ -102,97 +102,7 @@
data() {
return {
inputRegex: '',
inputText: '',
tips: [
{
section: 'Character Classes',
child: [
{
text: 'Any character except newline',
code: '.'
},
{
text: 'Word, digit, whitespace',
code: '\\w \\d \\s'
},
{
text: 'Not word, digit, whitespace',
code: '\\W \\D \\S'
},
{
text: 'Any of a, b, or c',
code: '[abc]'
},
{
text: 'Not a, b, or c',
code: '[^abc]'
},
{
text: 'Character between a & f',
code: '[a-f]'
}
]
},
{
section: 'Anchors',
child: [
{
text: '^ is the start of the string, $ end of string',
code: '^abc$'
},
{
text: 'Word, not word boundary',
code: '\\b \\B'
}
]
},
{
section: 'I\'ve made a mistake',
child: [
{
text: 'Change last commit message',
code: 'git commit --amend'
},
{
text: 'Undo most recent commit and keep changes',
code: 'git reset HEAD~1'
},
]
},
{
section: 'Setup SSH',
child: [
[
{
text: '1). Generate an SSH key.',
code: 'ssh-keygen -t rsa -b 4096 -C "[email]"'
},
{
text: '2). Start the ssh-agent in the background.',
code: 'eval "$(ssh-agent -s)"'
},
]
]
},
{
section: 'Merge and rebase',
child: [
{
text: 'Merge a branch into the current',
code: 'git merge [branch]'
},
{
text: 'Abort merge (conflicts)',
code: 'git merge --abort'
},
{
text: 'Continue merge after resolving conflicts',
code: 'git merge --continue'
},
]
},
]
inputText: ''
}
},
methods: {