gutterpress 0.11.19-alpha.1 → 0.11.19-alpha.2
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/dist/api/index.js +1 -1
- package/dist/{build-vgz3pr8y.js → build-wbfzx37g.js} +3 -3
- package/dist/checks/source/character-table.d.ts +63 -0
- package/dist/checks/source/characters.d.ts +1 -0
- package/dist/checks/source/index.d.ts +1 -0
- package/dist/{cli-mkn97gxp.js → cli-55jd2t8p.js} +322 -159
- package/dist/{cli-5j0a5hmc.js → cli-r7czdzyz.js} +1 -1
- package/dist/{cli-n3nd3sav.js → cli-xf9b7ptc.js} +1 -1
- package/dist/cli.js +12 -12
- package/dist/{doctor-gxf8ty3n.js → doctor-mkhpss2t.js} +2 -2
- package/dist/{ext-7j388f5z.js → ext-vw89b9sm.js} +3 -3
- package/dist/{index-n4ek1358.js → index-eqxs5118.js} +326 -163
- package/dist/index.js +1 -1
- package/dist/{new-0wyn55dn.js → new-3g19kf7m.js} +3 -3
- package/dist/{preflight-re9v4skc.js → preflight-62r2cnyx.js} +3 -3
- package/dist/{preview-2x113vyc.js → preview-sjq8afwc.js} +3 -3
- package/dist/{publish-r379k1hr.js → publish-fq6gmn4e.js} +3 -3
- package/dist/{validate-fje7ca9g.js → validate-2zsqvbtk.js} +3 -3
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-55jd2t8p.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-r7czdzyz.js";
|
|
8
8
|
import {
|
|
9
9
|
UsageError,
|
|
10
10
|
parseFormat,
|
|
11
11
|
parsePdfxFlavor,
|
|
12
12
|
rejectExtraPositionals,
|
|
13
13
|
rejectUnknownFlags
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-xf9b7ptc.js";
|
|
15
15
|
import"./cli-ht1bcqdd.js";
|
|
16
16
|
import"./cli-xx94a1k6.js";
|
|
17
17
|
import {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The characters `source.characters` reports (#382), each with what the
|
|
3
|
+
* author types instead.
|
|
4
|
+
*
|
|
5
|
+
* They arrive by pasting from a chat model, a word processor, a web page or a
|
|
6
|
+
* PDF: typography the author did not choose (em dashes, curly quotes, an
|
|
7
|
+
* ellipsis character, arrows, emoji), look-alikes, and invisible characters
|
|
8
|
+
* that change what prints (a zero-width space splits a word, a byte-order
|
|
9
|
+
* mark at the top of a file turns the first heading into a paragraph).
|
|
10
|
+
*
|
|
11
|
+
* Every spelling here is plain ASCII that the renderer turns back into the
|
|
12
|
+
* same character: markdown-it's typographer (`typographer: true` in
|
|
13
|
+
* `lib/markdown/renderer.ts`) makes `---` an em dash and straight quotes
|
|
14
|
+
* curly, and HTML entities cover the rest. So an intentional use stays
|
|
15
|
+
* possible and visible in the source; only the raw pasted character is
|
|
16
|
+
* reported. « » „ ‚ ‹ › are deliberately absent: they are correct quotation
|
|
17
|
+
* marks in other languages and the typographer cannot produce them.
|
|
18
|
+
*
|
|
19
|
+
* PURE data, no imports: the desktop editor mirrors this module
|
|
20
|
+
* (`packages/desktop/src/lib/editor/special-characters.ts`) to mark the same
|
|
21
|
+
* characters as the author types, and `tests/editor/special-characters.test.ts`
|
|
22
|
+
* there holds the two copies equal.
|
|
23
|
+
*/
|
|
24
|
+
/** Stable id for the kind of character, carried on each finding's `code`. */
|
|
25
|
+
export type CharacterCode =
|
|
26
|
+
/** The typographer makes it from plain typing (`---`, `"`, `...`). */
|
|
27
|
+
"typographer"
|
|
28
|
+
/** Looks like a quote mark or hyphen but is not one. */
|
|
29
|
+
| "lookalike"
|
|
30
|
+
/** Bullets, arrows, marks and emoji. */
|
|
31
|
+
| "symbol"
|
|
32
|
+
/** Zero-width, format and bidi characters. */
|
|
33
|
+
| "invisible"
|
|
34
|
+
/** A space that is not a plain space. */
|
|
35
|
+
| "whitespace"
|
|
36
|
+
/** A control character. */
|
|
37
|
+
| "control"
|
|
38
|
+
/** U+FFFD, left where an encoding error lost the real character. */
|
|
39
|
+
| "replacement"
|
|
40
|
+
/** A private-use code point: a glyph only its own font has. */
|
|
41
|
+
| "private-use";
|
|
42
|
+
export interface CharacterInfo {
|
|
43
|
+
/** Plain-language name, e.g. "Em dash". */
|
|
44
|
+
name: string;
|
|
45
|
+
code: CharacterCode;
|
|
46
|
+
/** What to do about it, as a sentence for the author. */
|
|
47
|
+
fix: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Every reported character, one code point at a time. Built from a string,
|
|
51
|
+
* not a regex literal: Bun's transpiler turns `\u2028` / `\u2029` escapes in
|
|
52
|
+
* a regex literal into the raw characters, which are line terminators, and
|
|
53
|
+
* the file no longer parses. Emoji are those shown as emoji by default, plus
|
|
54
|
+
* any pictograph followed by the emoji presentation selector (U+FE0F).
|
|
55
|
+
*/
|
|
56
|
+
export declare const CHARACTER_PATTERN: RegExp;
|
|
57
|
+
/**
|
|
58
|
+
* Describe one character {@link CHARACTER_PATTERN} matched. Only called on
|
|
59
|
+
* matches, so the emoji fallback is the only branch left at the end.
|
|
60
|
+
*/
|
|
61
|
+
export declare function describeCharacter(char: string): CharacterInfo;
|
|
62
|
+
/** `U+2014` for a character. */
|
|
63
|
+
export declare function codePointLabel(char: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|