Fossil

Timeline
Login

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

About branch markdown-tagrefs

The purpose of the markdown-refs branch is to experiment with adding hashtag and @username support into the markdown parser.

In short, it attempts to recognize hashtags and @username references and wraps those tokens in SPAN elements with well-defined class name so that they can be identified by downstream JavaScript code and context-specific features applied to them:

  • #Hashtag ==> <span data-hashtag="Hashtag">#Hashtag</span>
  • #nnnnn (numeric) ==> <span data-numtag="nnnnn">#nnnnn</span>
  • @name ==> <span data-atref="name">@name</span>

They have no outwardly-visible effect unless JS code is used to fetch the elements and apply features to them. The most obvious use for hashtags would be to apply them as filters in the forum and add a way to tag forum posts. Clicking on a hashtag in the forum would filter on messages which have that tag. (Note that containing the hashtag and "having that tag" are separate things: opaque text vs. a fossil tag artifact.) One issue we'd have for that use case, though, is that fossil tags are case-sensitive and hashtags are notoriously inconsistent in their casing, so any interface for adding tags for this purpose would need to lowercase them for consistency.

The core hashtag parsing seems to work well, including support for non-ASCII hashtags, and a demo of its use is integrated into the /chat page:

  1. Tapping a #nnnnn numeric hashtag will scroll to the given message if it's been loaded. It's common to reference other messages that way in chat, and this branch now makes it easier to refer back to such references.
  2. Tapping a hashtag will filter only on messages containing that hashtag.

The @name support is more fragile. For one, it only supports ASCII characters. Secondly, it does not support email-format user names (which are legal in fossil). The flexibility of user names in fossil makes these far more difficult to parse reliably from arbitrary text.

Potential uses for these tags include:

  • A separate, presumably louder/more visible, notification in /chat when a message containing a tag of your own name arrives.
  • Filtering /chat and /forum posts by a user. The latter requires more UI infrastructure for providing a way to tag posts and search engine features for searching by hashtags.
  • In the forum, constructs like "in response to #29" would link to the most recent post #29 (possibly 29.x) if it's loaded in the current page.
46 check-ins related to "markdown-tagrefs"
2022-06-18
07:04
Merged in trunk. ... (Leaf check-in: 4d629929 user: stephan tags: markdown-tagrefs)
2022-06-17
11:04
Made a cryptic 'not found' error message when failing to resolve a symbolic name slightly less cryptic in response to confusion reported in forum post 1eaa68bb75. ... (check-in: 30f669b0 user: stephan tags: trunk)
2022-06-11
12:34
Merged in trunk. ... (check-in: fd14e7ec user: stephan tags: markdown-tagrefs)
08:32
Typo fix report in 099e10c762b43add. ... (check-in: b942cd21 user: stephan tags: trunk)
2022-04-24
22:46
Merged in trunk, resolved conflicts introduced via the parallel development of the markdown-footnotes branch. ... (check-in: 64af75b0 user: stephan tags: markdown-tagrefs)
22:31
Applied trivial repolist sorting patch from forum post 6803efde75. ... (check-in: 61974c48 user: stephan tags: trunk)
2022-04-08
08:46
Merged in trunk. ... (check-in: e8a1382f user: stephan tags: markdown-tagrefs)
08:45
Cherrypicked [2f3c84b3e9ed], which wash intended for trunk. ... (check-in: 834db57d user: stephan tags: trunk)
2022-04-07
15:37
s/Safara/Safari/, per report from forum post 9e8015e09c. ... (check-in: 2f3c84b3 user: stephan tags: markdown-tagrefs)
2022-03-30
14:15
Merged in trunk. ... (check-in: 28fa0153 user: stephan tags: markdown-tagrefs)
2022-03-28
13:39
Bug fix to the abs() function of pikchr. ... (check-in: b80ae021 user: drh tags: trunk)
2022-01-15
13:58
Cherrypicked [5fd1ca6f] (was checked in to wrong branch). ... (check-in: 8d456a5b user: stephan tags: trunk)
13:54
In standalone TLS mode, SSL_read() must be performed in a loop to avoid truncated POST data. Discussed in althttpd forum post 11c263b822fde80d. ... (check-in: 5fd1ca6f user: stephan tags: markdown-tagrefs)
10:09
Merged in trunk. ... (check-in: d11cbb63 user: stephan tags: markdown-tagrefs)
07:15
fix formatting style as per https://fossil-scm.org/forum/forumpost/a711fb4fa0 ... (check-in: 9769c4f7 user: rdb tags: trunk)
2021-12-31
02:59
Merged in trunk. ... (check-in: c800d2ca user: stephan tags: markdown-tagrefs)
2021-12-30
19:25
Updated change log for new /chat embedding feature. ... (check-in: 79ebb3c1 user: stephan tags: trunk)
2021-12-16
04:20
Merged in trunk and resolved numerous code clashes in /chat. ... (check-in: 54dba747 user: stephan tags: markdown-tagrefs)
2021-12-14
14:49
Added help text doc for -k alias for --keep for the open command, per forum post 6f17cf142f80e2c3. ... (check-in: 8fee91d4 user: stephan tags: trunk)
2021-10-06
02:38
Merge in trunk for test server deployment. ... (check-in: 664b04b2 user: stephan tags: markdown-tagrefs)
02:37
/chat: a potential fix to stop *some* builds of Firefox from pasting formatted content into the edit field. (Some builds, same version, do not do so.) ... (check-in: 498bc071 user: stephan tags: trunk)
2021-10-05
18:44
Merged in trunk for latest /chat features. ... (check-in: 49689e1c user: stephan tags: markdown-tagrefs)
18:43
/chat: re-added accidentally-disabled animation. Added a button to locally delete all messages prior to the current one in the per-message controls. The intent is to stop unbounded growth (and potential lag) in long-running chats and give the user to way to flag "have read up until this point". ... (check-in: fe0bcfaa user: stephan tags: trunk)
17:31
Any non-ASCII characters are now considered valid for use in hashtags. ... (check-in: 4f68a130 user: stephan tags: markdown-tagrefs)
2021-10-04
19:48
Merged in trunk for latest (and conflicting) /chat changes. ... (check-in: 7cae4c09 user: stephan tags: markdown-tagrefs)
19:33
/chat: reduced the size of the non-compact-mode buttons a bit, based on user feedback. We'll call this solved for now. ... (check-in: 1fc2a265 user: stephan tags: trunk)
2021-09-29
16:50
Merged in trunk for latest changes. ... (check-in: 09f86815 user: stephan tags: markdown-tagrefs)
16:45
Consolidated /wikiedit, /pikchrshow, /fileedit, and /chat to use shift-enter to run preview mode. The former 3 previously used ctrl-enter but it was poorly documented and probably not widely used like ctrl-enter is in chat (to send a message). ... (check-in: 13fabf3f user: stephan tags: trunk)
2021-09-28
11:22
/chat: experimental HTML5 history support for using the back button to return to a message from which a #nnn message ID was clicked. ... (check-in: 9df3fc6b user: stephan tags: markdown-tagrefs)
11:06
Merged in trunk. /chat changed jump-to-message animation to fade out/in, per requests. Added HTML5 history to /chat clicks on #NNN message references but it's disabled because it's behaving unexpectedly. ... (check-in: 99b23d0f user: stephan tags: markdown-tagrefs)
09:45
Moved chat.js to fossil.page.chat.js, for consistency with the other single-page apps and to emphasize that it is not to be loaded on arbitrary pages. Changed chat's startup to wait until the page on-load event to avoid a related timing issue. ... (check-in: 3ec8c6c0 user: stephan tags: trunk)
2021-09-25
12:26
Added #NNN and #NNN.NNN references as a special case of hashtag, noting that it will currently match a prefix of #NNN.NNN.NNN. Taught /chat that clicking on such a reference should jump to the referenced message or toast the user that the message is not in the current history. ... (check-in: 4539bf87 user: stephan tags: markdown-tagrefs)
11:35
/chat: when applying a filter, automatically switch to the messages view. Apply hashtag processing to the preview view. ... (check-in: b59a761b user: stephan tags: markdown-tagrefs)
10:54
Improved the behavior in the face of multiple filters, applying only the most recent one. Added a button to clear filters which appears along the bottom of the message area if any filter is active. ... (check-in: 93bf2505 user: stephan tags: markdown-tagrefs)
08:17
More progress on the markdown #hashtag parsing. ... (check-in: ac5b66bb user: stephan tags: markdown-tagrefs)
07:20
Merged in latest trunk. test-markdown-render now accepts files and string literals. ... (check-in: 5618cceb user: stephan tags: markdown-tagrefs)
07:00
Added missing new mkd_renderer entry in markdown_extract_links() to skip over @/#tags. ... (check-in: 2e646428 user: stephan tags: markdown-tagrefs)
2021-09-24
17:18
Added an optional widget to /chat which gives an overview of who is actively posting and enables filtering messages by users. ... (check-in: ce0d61bb user: stephan tags: trunk)
2021-09-21
17:36
Removed a bogus unreached return statement. ... (check-in: 4b98f9e7 user: stephan tags: markdown-tagrefs)
17:34
More refinement of the token selection for #hashtag and @name references. ... (check-in: 3363ab42 user: stephan tags: markdown-tagrefs)
16:42
Fixed a paren nesting bug that prevented multi-character hashtags from being processed. It would stop at the second character. ... (check-in: e211f1ab user: wyoung tags: markdown-tagrefs)
16:38
Added '@' and '#' prefixes in spans. Initial commit ate them. ... (check-in: 398cfa0b user: wyoung tags: markdown-tagrefs)
16:29
Merged in parallel trunk changes. ... (check-in: 9b07f400 user: stephan tags: markdown-tagrefs)
16:28
Removed some extraneous console debug output. ... (check-in: 8663dde1 user: stephan tags: trunk)
16:19
Initial implementation of "span data-foo" wrappers around @name and #tag references. Seems functional on a test-markdown-render basis, but the definitions of what counts as a reference and what to do with them still remains to be handled. ... (check-in: 31a607d3 user: wyoung tags: markdown-tagrefs)
15:02
Updated changelog for chat preview. Hyperlinks in preview mode now have target=_blank. Removed extraneous FORM element around chat input area, as it caused only grief with regards to Enter key handling (always activating the first button in the list, which is now the preview button). ... (check-in: 60ed1ff9 user: stephan tags: trunk)