update scripts
This commit is contained in:
1 parent
baa5bc091e
commit
7730257557
2 files changed
+14
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { WaniKani } from '@/wanikani';
|
||||
|
||||
async function main() {
|
||||
const wk = new WaniKani();
|
||||
wk.$axios
|
||||
.get('/level_progressions')
|
||||
.then((r) => console.dir(r.data, { depth: null }));
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
main();
|
||||
}
|
||||
@@ -416,6 +416,7 @@ export class WaniKani {
|
||||
sentenceCloze?: string;
|
||||
},
|
||||
opts: {
|
||||
prependEnglishCloze?: boolean;
|
||||
overwrite?: boolean;
|
||||
} = {},
|
||||
) {
|
||||
@@ -504,6 +505,7 @@ export class WaniKani {
|
||||
const notJa = '[^\\p{sc=Han}\\p{sc=Katakana}\\p{sc=Hiragana}]+';
|
||||
|
||||
if (
|
||||
opts.prependEnglishCloze &&
|
||||
clozeSent &&
|
||||
!new RegExp(
|
||||
`(^${notJa}<br/?>|<br/?><br/?>${notJa}$)`,
|
||||
|
||||
Reference in new issue
Block a user