- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL - 修复 HomePage.tsx 中所有图片引用 - 修复 CoursePage.tsx 中所有图片引用 - 确保图片在 GitHub Pages 上正确加载 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
/**
|
|
* @fileoverview Define the cursor which ignores the first few tokens.
|
|
* @author Toru Nagashima
|
|
*/
|
|
"use strict";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Requirements
|
|
//------------------------------------------------------------------------------
|
|
|
|
const DecorativeCursor = require("./decorative-cursor");
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Exports
|
|
//------------------------------------------------------------------------------
|
|
|
|
/**
|
|
* The decorative cursor which ignores the first few tokens.
|
|
*/
|
|
module.exports = class SkipCursor extends DecorativeCursor {
|
|
|
|
/**
|
|
* Initializes this cursor.
|
|
* @param {Cursor} cursor The cursor to be decorated.
|
|
* @param {number} count The count of tokens this cursor skips.
|
|
*/
|
|
constructor(cursor, count) {
|
|
super(cursor);
|
|
this.count = count;
|
|
}
|
|
|
|
/** @inheritdoc */
|
|
moveNext() {
|
|
while (this.count > 0) {
|
|
this.count -= 1;
|
|
if (!super.moveNext()) {
|
|
return false;
|
|
}
|
|
}
|
|
return super.moveNext();
|
|
}
|
|
};
|