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

50 most recent check-ins related to "markdown-footnotes"

Extend Markdown with footnotes support. See known limitations and the corresponding forum thread. ... (check-in: 3990518b user: george tags: trunk)
Change signature of add_inline_footnote() in order to move away from returning of unreliable pointer. Amend a few comments. Fix a couple of minor issues that fuzzer complains about. ... (Closed-Leaf check-in: 0850862e user: george tags: markdown-footnotes)
Fix a possible heap-buffer-overflow in parse_htmlblock() introduced by [1e919d601f774fdb]. This is not related to footnotes but was revealed by fuzzing (case 80cbb6b185807e98a953426af7b1f802c9d13957). ... (check-in: bc4c5b63 user: george tags: markdown-footnotes)
Remove redundant assert() that fails for the case when the content of a span-bounded inline footnote is rendered into a void. This is a corner case that was revealed via fuzzing. ... (check-in: cab8a586 user: george tags: markdown-footnotes)
Add a test case for fragment-bounded footnote that contains markup within the corresponding text fragment. ... (check-in: d38ec43d user: george tags: markdown-footnotes)
Fix another use-after-realloc bug in handling of inline footnotes which was discovered during fuzzing. Also fix a few other issues revealed via fuzzer. ... (check-in: c5456211 user: george tags: markdown-footnotes)
Revert to normal builds (leave a few comments about fuzzing). ... (check-in: 94077966 user: george tags: markdown-footnotes)
Fix a use-after-free bug in handling of nested inline footnotes. The bug was discovered by fuzzing with '-fsanitize=fuzzer,undefined,address -DFOSSIL_FUZZ' appended to TCCFLAGS in It's noteworthy that the ',undefined,address' part was essential to find the bug (otherwise just 'double-free' was reported). Many thanks to Stephan for documenting the fuzzing procedures and support. ... (check-in: 31e5df5f user: george tags: markdown-footnotes)
Added a missing blob initializer. ... (check-in: 72095938 user: stephan tags: markdown-footnotes)
Merged in trunk for fuzz.c changes. ... (check-in: c9f40135 user: stephan tags: markdown-footnotes)
Correct fuzz.c to honor --fuzztype markdown and add --fuzztype wiki2 which works like its previous --fuzztype wiki behavior, sending all inputs through both the fossil-wiki and markdown translators. Added a fatal error for --fuzztype artifact, as that tester is not implemented. ... (check-in: 8d4c4792 user: stephan tags: trunk)
Remove unnecessary field from the auxiliary union 'bitfield64_t' and amend the corresponding comments. Also add comment about FOOTNOTES_WITHOUT_URI macro. ... (check-in: cf1e9691 user: george tags: markdown-footnotes)
Code style tweaks, typos, and resolved a couple footnotes-related cosmetic TODOs. No functional changes. ... (check-in: 3a5b3d5e user: stephan tags: markdown-footnotes)
Merged in latest trunk to simplify code review and ease potential upcoming merge to trunk. ... (check-in: 8a4b099f user: stephan tags: markdown-footnotes)
Minor spelling corrections. No change in functionality. ... (check-in: 53754fff user: andybradford tags: trunk)
Count overnesting as the fourth type of the footnote-related issues and report accordingly. ... (check-in: ae297bb6 user: george tags: markdown-footnotes)
Minor refactoring. Move the definition of BLOB_APPEND_LITERAL() macro from markdown_html.c to blob.c so that it could be used outside of markdown_html.c. Also rename it to lowercase for consistency with other API. Within markdown.c use that newly available macro instead of blob_append_string(). Within markdown_html.c use it for footnotes-relevant code. Other invocations of BLOB_APPEND_LITERAL() within markdown_html.c are left intact (they use an alias) in order to simplify the potential merge with the trunk. ... (check-in: c8a8d0c9 user: george tags: markdown-footnotes)
Minor refactoring. Move the definition of BLOB_APPEND_BLOB() macro from markdown_html.c to blob.c so that it could be used outside of markdown_html.c. Also rename it to blob_appendb() for consistency with blob_appendf() and other API. Within markdown.c use that newly available macro where appropriate. Within markdown_html.c use it for footnotes-relevant code. Other invocations of BLOB_APPEND_BLOB() within markdown_html.c are left intact (they use an alias) in order to simplify the potential merge with the trunk. ... (check-in: 33a681eb user: george tags: markdown-footnotes)
Fix handling of user-provided classes for unreferenced, joined and overnested footnotes. In all these cases the tokens of user-provided classes are rendered as plain-text and no special classes are added anywhere. ... (check-in: 875472a8 user: george tags: markdown-footnotes)
Add a comment for append_footnote_upc(). Also substitute a variable of zero value with just "0" constant. No functional changes. ... (check-in: ae8a3dd5 user: george tags: markdown-footnotes)
Impose a limit on the depth of nesting of inline footnotes. Also add a few test cases: for depth limiting and HTML hijacking. ... (check-in: f4ff013a user: george tags: markdown-footnotes)
If there are issues with footnotes then set TH1 variable $footnotes_issues_counters to a space separated list of integers that count for "misref", "unref" and "joins". This eliminates the need for JavaScript for the case when a custom skin wants to warn about issues with footnotes in the header of a page.
Also fix counting of "joins": count the number of unique labels that have multiple definitions (and not the number of such definitions).
... (check-in: 773cef5c user: george tags: markdown-footnotes)
Parse inline footnotes even if a renderer does not define a callback for rendering of footnote markers. This seems more correct even though the current implementation of backlink processor does define such callback as an empty function. ... (check-in: e06c12d1 user: george tags: markdown-footnotes)
Handle some corner cases more thoroughly: dismiss empty footnotes, passthrough (more carefully) user-provided classlist if the token is not followed by a blank character or if a footnote's text consists just of such token and blank characters. Also simplify a little bit a few places inside of is_footnote() function. ... (check-in: fe315780 user: george tags: markdown-footnotes)
Add --lint-footnotes option to the test-markdown-render command. If this flag is given and footnotes in the input have issues, then print to stderr the counters of "misrefs", "strays" and "split-defs" and exit with error. This should partially address a concern raised at the forum. ... (check-in: 1f525713 user: george tags: markdown-footnotes)
If a footnote's text starts with a token of the special form then use this token to derive a set of CSS classes that are added to that footnote and its references. This enables users to style elements of a particular footnote provided that the administrator provisioned and documented some special CSS classes in a custum skin. Default skin does not provide any of such special classes which makes this feature an "opt-in". ... (check-in: 92516ced user: george tags: markdown-footnotes)
Clean-up and rephrase some comments. ... (check-in: a62c8768 user: george tags: markdown-footnotes)
Make parsing slightly faster and fix a comment. No changes in functionality. ... (check-in: a36dd09d user: george tags: markdown-footnotes)
Include REQUEST_URI into footnotes' hyperlinks. This should make links work even if base href (in a page's header) is not consistent with the REQUEST_URI. If FOOTNOTES_WITHOUT_URI macro is defined while compiling src/markdown_html.c then bare "#fragment" hyperlinks (without REQUEST_URI) are generated. ... (check-in: 2c1f8f35 user: george tags: markdown-footnotes)
Minor code refactoring: rename a temporary variable and utilize matching_bracket_offset() one more time. No changes in functionality. ... (check-in: 5b845a07 user: george tags: markdown-footnotes)
Fix parsing of "free-standing" footnotes that was (slightly) broken by the previous check-in. ... (check-in: 23c3e0b2 user: george tags: markdown-footnotes)
If markup is ambigous between a "span-bounded" footnote and a "free-standing" footnote followed by another footnote then interpret as the later case. ... (check-in: b363a4db user: george tags: markdown-footnotes)
Fix parsing of a multiline definition of labeled footnote for the case when lines end with CR+LF. ... (check-in: ea66d15c user: george tags: markdown-footnotes)
Clean-up and polish relevant CSS and HTML's class names. Insure visual spacing between footnotes' markers so that numbers are distinguishable when multiple footnotes in a row are used. Factor out auxiliary decorations from HTML into the default CSS, to enable customization via skins. ... (check-in: 2b1375ab user: george tags: markdown-footnotes)
Handle unreferenced footnotes. If a labeled footnote is defined but there are no references to it, then add a special item at the end of footnotes. This item includes a label and the text of the strayed footnote - both rendered verbatim via html_escape(). Default skin makes such items visible and easily distinguishable. The order of such items match the order in the underlying source code. ... (check-in: ada55cd4 user: george tags: markdown-footnotes)
Cherrypicked [92221aaa192e82] and [7283ae6e120c10] on behalf of George. ... (check-in: f902814d user: stephan tags: trunk)
Join duplicated footnotes slightly faster. Fix a comment about auxiliary cmp_footnote_id() function. ... (check-in: 7f6a6418 user: george tags: markdown-footnotes)
Fix a misuse of an unsigned integer in the blobReallocMalloc() which can lead to redundant memory reallocations. ... (check-in: 92221aaa user: george tags: markdown-footnotes)
Fix a bug in the blob_reserve() function that was introduced by [1243bf39996b8a]. The current mainline is not affected because this function is not used anywhere. However it was causing memory corruption on the 'markdown-footnotes' branch since it was employed in [544df852b2d9a1]. ... (check-in: 7283ae6e user: george tags: markdown-footnotes)
An attempt to fix a "double free crash" from the previous check-in. ... (check-in: 18c9d103 user: george tags: markdown-footnotes)
If several footnotes are defined with the same label then join them into a single footnote. Text from each definition becomes an item in the list. This solution makes such situations noticable for the usual case (when this is an oversight) but also not obtrusive for the rare cases (when this is intentional). The list is provided with a special class to enable styling via skin customization.
This check-in is known to cause crash, see the forthcoming check-in.
... (check-in: 544df852 user: george tags: markdown-footnotes)
Add const qualifier to the arguments of the blob_compare() function. ... (check-in: 2822b63b user: george tags: markdown-footnotes)
Handle misreferences more thoroughly. Implement support of footnotes-within-footnotes with (hopefully) proper crosslinking (that's where it's getting tricky). ... (check-in: 1787f6df user: george tags: markdown-footnotes)
Handle misreferences: a reference to undefined footnote. ... (check-in: 28e6a9cd user: george tags: markdown-footnotes)
Minor code refactoring. ... (check-in: 2636e224 user: george tags: markdown-footnotes)
Automatically render a horizontal rule before the list of footnotes. If desired a particular skin can hide it using CSS selector "hr.footnotes-separator". ... (check-in: 6807b434 user: george tags: markdown-footnotes)
Add file test/ that is suggested as an accumulator of footnotes-specific test cases. ... (check-in: fe9e6ff9 user: george tags: markdown-footnotes)
For rendering a numeric footnote mark enclose HTML tag "a" inside of tag "sup" (instead of the opposite) and format anchor's id using "noteref%s-%i-%s" template (instead of "noteref-%s%i-%s"). Add highlighting when hovering over a span-bounded footnotes. ... (check-in: fb999972 user: george tags: markdown-footnotes)
Fix documentation so that an example of a referenced footnote definition inside of the fenced code block is not recognized as a real footnote defenition. This demonstrates a subtle gotcha and a possible work-arround of it. ... (check-in: 7229d0f5 user: george tags: markdown-footnotes)
Switch to (^...) for inline footnotes. Implement span-specific footnotes. Add documentation. ... (check-in: cae7a5d1 user: george tags: markdown-footnotes)