forked from FINAKON/HelpProject
1. Initial Commit - a boiler plate code and POC to realize the concept of context sensitive help 2. Frontend code written in ReactJS 3. Backend code written in Java, Spring Boot Framework 4. Frontend Start: pre-requisites : node, npm npm run dev ==> to start the frontend vite server 5. Backend Start: pre-requisites : java, mvn mvn spring-boot:run ==> to start the backend server 6. Visit http://localhost:5173/ for basic demo of help, press F1 in textboxes 7. Visit http://localhost:5173/editor and enter "admin123" to add/modify texts. Happy Coding !!! Thank you, Bhargava.
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { ERR, type ParserError, type ParserErrorHandler } from '../common/error-codes.js';
|
|
export declare class Preprocessor {
|
|
private handler;
|
|
html: string;
|
|
pos: number;
|
|
private lastGapPos;
|
|
private gapStack;
|
|
private skipNextNewLine;
|
|
lastChunkWritten: boolean;
|
|
endOfChunkHit: boolean;
|
|
bufferWaterline: number;
|
|
private isEol;
|
|
private lineStartPos;
|
|
droppedBufferSize: number;
|
|
line: number;
|
|
constructor(handler: {
|
|
onParseError?: ParserErrorHandler | null;
|
|
});
|
|
/** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */
|
|
get col(): number;
|
|
get offset(): number;
|
|
getError(code: ERR, cpOffset: number): ParserError;
|
|
private lastErrOffset;
|
|
private _err;
|
|
private _addGap;
|
|
private _processSurrogate;
|
|
willDropParsedChunk(): boolean;
|
|
dropParsedChunk(): void;
|
|
write(chunk: string, isLastChunk: boolean): void;
|
|
insertHtmlAtCurrentPos(chunk: string): void;
|
|
startsWith(pattern: string, caseSensitive: boolean): boolean;
|
|
peek(offset: number): number;
|
|
advance(): number;
|
|
private _checkForProblematicCharacters;
|
|
retreat(count: number): void;
|
|
}
|