rumdl-wasm 0.0.195 → 0.0.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rumdl_lib.d.ts +7 -4
- package/rumdl_lib.js +13 -10
- package/rumdl_lib_bg.wasm +0 -0
package/package.json
CHANGED
package/rumdl_lib.d.ts
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* Initialize the WASM module with better panic messages
|
|
5
5
|
*/
|
|
6
6
|
export function init(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Get the rumdl version
|
|
9
|
+
*/
|
|
10
|
+
export function get_version(): string;
|
|
7
11
|
/**
|
|
8
12
|
* Get list of available rules as JSON
|
|
9
13
|
*
|
|
@@ -12,10 +16,6 @@ export function init(): void;
|
|
|
12
16
|
* - `description`: Rule description
|
|
13
17
|
*/
|
|
14
18
|
export function get_available_rules(): string;
|
|
15
|
-
/**
|
|
16
|
-
* Get the rumdl version
|
|
17
|
-
*/
|
|
18
|
-
export function get_version(): string;
|
|
19
19
|
/**
|
|
20
20
|
* A markdown linter with configuration
|
|
21
21
|
*
|
|
@@ -61,6 +61,9 @@ export class Linter {
|
|
|
61
61
|
* - `line`: 1-indexed line number
|
|
62
62
|
* - `column`: 1-indexed column number
|
|
63
63
|
* - `fix`: Optional fix object with `range.start`, `range.end`, `replacement`
|
|
64
|
+
*
|
|
65
|
+
* Note: Fix ranges use character offsets (not byte offsets) for JavaScript compatibility.
|
|
66
|
+
* This is important for multi-byte UTF-8 characters like `æ` or emoji.
|
|
64
67
|
*/
|
|
65
68
|
check(content: string): string;
|
|
66
69
|
}
|
package/rumdl_lib.js
CHANGED
|
@@ -211,19 +211,15 @@ export function init() {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* Get
|
|
215
|
-
*
|
|
216
|
-
* Returns a JSON array of rule info objects, each with:
|
|
217
|
-
* - `name`: Rule name (e.g., "MD001")
|
|
218
|
-
* - `description`: Rule description
|
|
214
|
+
* Get the rumdl version
|
|
219
215
|
* @returns {string}
|
|
220
216
|
*/
|
|
221
|
-
export function
|
|
217
|
+
export function get_version() {
|
|
222
218
|
let deferred1_0;
|
|
223
219
|
let deferred1_1;
|
|
224
220
|
try {
|
|
225
221
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
226
|
-
wasm.
|
|
222
|
+
wasm.get_version(retptr);
|
|
227
223
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
228
224
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
229
225
|
deferred1_0 = r0;
|
|
@@ -236,15 +232,19 @@ export function get_available_rules() {
|
|
|
236
232
|
}
|
|
237
233
|
|
|
238
234
|
/**
|
|
239
|
-
* Get
|
|
235
|
+
* Get list of available rules as JSON
|
|
236
|
+
*
|
|
237
|
+
* Returns a JSON array of rule info objects, each with:
|
|
238
|
+
* - `name`: Rule name (e.g., "MD001")
|
|
239
|
+
* - `description`: Rule description
|
|
240
240
|
* @returns {string}
|
|
241
241
|
*/
|
|
242
|
-
export function
|
|
242
|
+
export function get_available_rules() {
|
|
243
243
|
let deferred1_0;
|
|
244
244
|
let deferred1_1;
|
|
245
245
|
try {
|
|
246
246
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
247
|
-
wasm.
|
|
247
|
+
wasm.get_available_rules(retptr);
|
|
248
248
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
249
249
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
250
250
|
deferred1_0 = r0;
|
|
@@ -366,6 +366,9 @@ export class Linter {
|
|
|
366
366
|
* - `line`: 1-indexed line number
|
|
367
367
|
* - `column`: 1-indexed column number
|
|
368
368
|
* - `fix`: Optional fix object with `range.start`, `range.end`, `replacement`
|
|
369
|
+
*
|
|
370
|
+
* Note: Fix ranges use character offsets (not byte offsets) for JavaScript compatibility.
|
|
371
|
+
* This is important for multi-byte UTF-8 characters like `æ` or emoji.
|
|
369
372
|
* @param {string} content
|
|
370
373
|
* @returns {string}
|
|
371
374
|
*/
|
package/rumdl_lib_bg.wasm
CHANGED
|
Binary file
|