Timeline
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

50 most recent check-ins

2024-09-02
21:03
Add last set of special attributes Special in the sense that they apply or they don't, so we just look for them during the build and generate the rules if present, then switch on the same logic but a bit earlier. Develop branch is neck-and-neck for generated size, at 101% of trunk. (Leaf check-in: 1981b47009 user: atman tags: develop)
01:00
Add a (dev only) flag for passing mFlags directly This is moderately crude, in that no effort is taken to verify that the value after mFlags is a valid hexadecimal integer. This is behind a macro, and I don't intend to include it long-term. If it were thought to be a desirable flag to have, adding a preparse step is practical. Adding <errno.h> just to check the error code seems like overkill in either case. (check-in: 55dc9ea781 user: atman tags: develop)
00:35
Add PIKCHR_EXTRA_UNIQUE_ID The last commit convinced me that, although nothing awful comes of the presence of duplicate ids on a Web page, it's bad hygiene, and there are places such as Fossil forums where a diagram can indeed appear twice in identical form. Therefore I've added a static int counter to `char *pikchr`, and when the mFlag PIKCHR_EXTRA_UNIQUE_ID is set, this hashes the bytes of the counter, after which it is unconditionally incremented. I don't know if this is a complete solution. A goal with the hash suffixes is that they don't change unless the diagrams change, and I can stretch this to circumstances like a diagram moving around on the page, but this also means that a long-running process which generates many pages, and uses this flag, will get different hashes depending on the order in which the pages are rendered. It's unclear what a better solution would look like, so this will do for now. (check-in: 6e19da1db4 user: atman tags: develop)
2024-09-01
23:38
Hash "darkmode" for PIKCHR_DARK_MODE Validation revealed something retrospectively obvious: inclusion of a Pikchr diagram with its dark mode counterpart in a single HTML file, given the hashing method, results in identical IDs for both. This failure mode is now prevented by hashing the string "darkmode" when the associated flag is set. (check-in: acb7972c54 user: atman tags: develop)
21:12
Fix remaining transparency cases One was a missed case of checking if a line is closed (if not it needs transparency). The other was detecting that condition after attributes so that the rule can be added to the CSS. (check-in: 838c77862e user: atman tags: develop)
01:22
CSS style properties for dominant-baseline and fill: transparent Still need to track down a few bugs with how the latter is handled. Will be easy enough with a fresh start on the day. (check-in: 6fc8ea75d4 user: atman tags: develop)
2024-08-31
20:50
Leave class list open. So we can add presentation classes after. (check-in: 7a421060eb user: atman tags: develop)
20:37
Annotate text classes on *p (check-in: 1c999d23c9 user: atman tags: develop)
18:48
Add attribute flags There are some presentation attributes which only take a limited set of values. These we can set as flags on `*p` and add to the CSS only when they are used, then emit a corresponding class for the attribute. (check-in: 22fc0b74c4 user: atman tags: develop)
17:58
Handle multiple user sets of color compatibly This has some weird consequences for the actual use of `textcolor` that I don't care for, but it should preserve identical visual output. (check-in: 48f7817325 user: atman tags: develop)
17:19
Add compare-branches script This is a script which expects two builds of pikchr named pikchr-trunk and pikchr-develop. It will run the former and then the latter on the diagrams in the tests directory, light and dark mode, emitting an html file which allows side-by-side comparison. Toggling these diagrams shows the svg code, instead of the Pikchr code which is identical by construction. (check-in: 584d71c235 user: atman tags: develop)
17:16
Sort out discrepancy in color / textcolor I spotted a difference in diagram output, caused by a user variable named "color" not being reflected in the value of textcolor. While I think it's better for textcolor to behave like color and fill, I'm aiming to have all current changes be visually identical to trunk branch diagrams. So now when we see color set, we check if textcolor is also set, and if not, we set it to the same value. (check-in: 2543ecfe15 user: atman tags: develop)
2024-08-28
23:25
Fix string allocation for title and diagram Instantly triggered when I added the diagrams I've done to the test corpus. Good reminder that fuzzers, as impressive as they are, are not very intelligent on their own. (check-in: 20d69265e8 user: atman tags: develop)
22:35
Fuzzfix: memory leak, unterminated string (check-in: 0ab9b4410c user: atman tags: develop)
21:31
Allow textcolor in parens Consistent with the other values in that production rule. (check-in: df1945915b user: atman tags: develop)
2024-08-27
23:44
Only hash parameter tokens which exist (check-in: f948f5c7db user: atman tags: develop)
22:07
Hash macro arguments inside parse_macro_args That appears to be the place to do it. Fuzzer compatible. (check-in: f866f92123 user: atman tags: develop)
21:58
Passes short(ish) fuzz run On the order of a few minutes, but this commit gets out of the instant counterexample phase of the operation. (check-in: 4ed3d00f97 user: atman tags: develop)
21:45
Fix: fuzzbugs (check-in: ce049bff98 user: atman tags: develop)
21:12
Whitespace (check-in: e2d9b746e9 user: atman tags: develop)
16:04
Adds missing spaces to output I'm about to overhaul rendering yet again, but I'm making a mental note here to write a shell script which will take everything in the examples folder and use xmllint to check for issues. (check-in: 6aabde3ddc user: atman tags: develop)
15:52
Merge from id-suffix branch (check-in: 88a8178f6d user: atman tags: develop)
2024-08-26
20:00
Fix missing = in stroke-dasharray (check-in: 21ac1ef357 user: atman tags: develop)
17:16
Style / spacing (check-in: 1178c7e39c user: atman tags: develop)
17:14
Use mProp flag to check if class is already set This leaves the ability to prepend more classes if it makes sense to do properties that way, and also matches the style for other attributes. (check-in: 4d3465a3c8 user: atman tags: develop)
15:29
Restrict class token matching rule T_ID may start with `_`, `$`, `@`, which is undesirable in CSS. A lead underscore is legal, but often reserved for internal classes, which I'm planning to do here. (check-in: ad2ccf48c4 user: atman tags: develop)
2024-08-25
15:15
Cleanup to coding standards (Leaf check-in: 2b89ebc81d user: atman tags: id-suffix)
2024-08-03
03:34
Merge id-suffix branch with develop (check-in: 2ae1f3f064 user: atman tags: develop)
03:21
Accessibility elements are ordinary statments. Also fixes a render bug caused by mis-counting the bytes in a string. (check-in: accaddf018 user: atman tags: id-suffix)
02:39
Add rendering of title, label, and description I realized as I was doing this, that there's no reason at all for these elements to be anything other than plain statements. Bit of a theme with me and this language, that. (check-in: 02f8cd8323 user: atman tags: id-suffix)
2024-08-02
23:08
Add title and description rules I'm not entirely satisfied with how this interacts with the rest of the grammar. Specifically, it allows only one newline between a title or a label, and the description. Plan is to work out the rendering and then come back to the grammatical niceties. (check-in: 283028c59a user: atman tags: id-suffix)
20:14
Merge trunk branch into id-suffix (check-in: 527e9029d0 user: atman tags: id-suffix)
05:08
Make 'class' an ordinary attribute This commit changes the grammar such that the two XML class rules which were irregular in form, now serve as ordinary attributes. I've abandoned the plan to retain an exception for groups/lists. After some thought, it adds little clarity and at the expense of the existing simplicity and regularity of form. (check-in: b87cf613e2 user: atman tags: develop)
04:37
Merge trunk branch (check-in: 28cdeedccf user: atman tags: develop)
04:33
Hash XML classes individually (check-in: 07b0b6d8a9 user: atman tags: develop)
2024-07-31
12:45
Typo fix in the previous checkin. (Leaf check-in: 1e14a4118c user: stephan tags: trunk)
12:19
PIC/Pikchr differences doc updates suggested in [/forumpost/8c99961f32aded60|forum post 8c99961f32aded60]. (check-in: 3b1d05b1ec user: stephan tags: trunk)
2024-07-24
13:50
In the previous check-in, a better value for font-size is "initial". (check-in: 1562bd171a user: drh tags: trunk)
12:05
Add "style='font-size:100%'" to the &lt;svg&gt; element to work around an issue in Safari. [/forumpost/8c9e9aa984|Forum post 8c9e9aa984]. (check-in: 67d1cab26b user: drh tags: trunk)
2024-06-25
06:23
Fix the behavior of "with .start". [/forumpost/a48fbe155b|Forum post a48fbe155b] (check-in: e79028e18d user: drh tags: trunk)
2024-04-20
16:39
Document that in string literals single backslashes are elided and newlines are permitted, based on forum feedback. (check-in: e224071e3a user: stephan tags: trunk)
15:53
Clarify newlines and backslashes in grammar of strings (check-in: 3eed4e5591 user: atman tags: develop)
01:32
Merge branch id-suffix to develop (check-in: 5ff64325ae user: atman tags: develop)
01:06
Merge no-inherit branch into develop branch (check-in: 00535a2278 user: atman tags: develop)
01:02
Create new branch named "develop" (check-in: 7b43eeca47 user: atman tags: develop)
2024-04-19
21:58
Hash arguments to macro We don't hash codeblocks when defined, we do hash the token stream when a macro is called, but we weren't hashing parameters anywhere: as $1, after substitution, or in the parameter list. Now we hash them where they appear, which is sufficient to produce the effect we're aiming for. (check-in: d2caf36723 user: atman tags: id-suffix)
14:43
Hash a newline if document doesn't have one That might be the last little bit of hash logic (other than class logic on its own branch). (check-in: d09761baf2 user: atman tags: id-suffix)
14:40
Add id tag based on hash Also fix an indentation error which was double-hashing EOLs. (check-in: c77e417619 user: atman tags: id-suffix)
14:28
Use memcpy instead of loop (check-in: 8dbbb1aee2 user: atman tags: id-suffix)
02:48
Add zID to Pik for ID suffix Needs a rewrite to format for the counter, if I end up doing that. (check-in: 2fd02849d0 user: atman tags: id-suffix)