-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO.txt
34 lines (28 loc) · 1.79 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
https://carlalexander.ca/beginners-guide-regular-expressions/
https://www.regular-expressions.info/
https://regex101.com/
https://regexr.com/
https://www.princeton.edu/~mlovett/reference/Regular-Expressions.pdf
Anything that can be normalized via regex, how about defining that in the configuration file as a list of regex and replacements?
Normalize topic
Normalize BOM and encoding.
Replace double space with single, recursively (exception: ignore *leading* whitespace within ```; OTHER CASES?).
Replace double carriage-return with single, recursively.
Ensure single carriage-return at end of file.
Replace yml delimters with plain
Read yml fields into dictionary, sort some (like req), write out in a rational order (e.g. title, desc, date together).
[!Note] => [!NOTE], so they're easier for the writer to spot.
In a Win32 API ref topic, delete the H1.
Etc.
Normalize table
Replace double hypthen with single.
Cellpadding: single space after |, and if there are contents a single space after that (before the next |).
Etc.
MAKE A LIST OF SIMPLIFICATIONS WE CAN MAKE IN TABLES (and, e.g. within **Xxx**), such as \* to *, \_ to _, and so on.
Do it with regex, figure out how to do replacements.
To transform table. Table class with collection of col headers and collection of rows (each a collection of cells; one for each col).
Load table into class. Read a list of col names that are repeated, and so ignore second and subsequent ones.
Refactor each row into one new class (and a heading).
Write out each class, normalized.
Parameter types. Parse headers for APIs for types, figure out a link for each type. Insert types and links into each topic if not present. Normalize if present.
Stubs. Update ProgramBase.ApiRefStubDirectoryInfo with the location of the stubs. Course, you'll have to get on to the right branch for that.