Where are Parse rules for ";" and ":"

44 views
Skip to first unread message

TonyM

unread,
May 13, 2019, 12:07:31 AM5/13/19
to TiddlyWikiDev
Folks

Can anyone please tell me where to find the Where are Parse rules for ";" and ":" in Tiddly wiki

I would like to create another that uses "." on a line to do the same as ";" without bolding so I can have a quick way of indicating a line/sentence in tiddlywiki that will have a line feed at the end and not merge with lines above and below. Consider it a single line/paragraph version of the 

"""
sections
Honoring line

feeds
"""


Thanks
Tony

TonyM

unread,
May 13, 2019, 12:29:56 AM5/13/19
to TiddlyWikiDev
These rules do no seem to be handled the same way as others

<$list filter="[[inline]]" variable=type>
   <$list filter="[wikiparserrules
<type>]" variable=rule>

   </$list>
</$list>

Where 
";" results in

<dl>
<dt>Hello</dt>
</dl>

Hello

I want a line with a leading "." to result in
<dt>Hello</dt>

Without the `<dl></dl>` wrap so it is not bolded

Regards
Tony

@TiddlyTweeter

unread,
May 13, 2019, 2:36:47 AM5/13/19
to TiddlyWikiDev
Ciao TonyM,

Not sure it helps, but the parser for definition lists is in with the other list constructs in "$:/core/modules/parsers/wikiparser/rules/list.js". There is a brief note on styling in it ...

Best wishes 
Josiah

TonyM

unread,
May 13, 2019, 3:42:43 AM5/13/19
to TiddlyWikiDev
Thanks Josiah - I missed that

I see it defines something similar, now so JS hacking.

; This is a term that is being defined
: This is the definition of that term

Regards
Tony

TonyM

unread,
May 13, 2019, 10:08:10 PM5/13/19
to TiddlyWikiDev
Folks,

$:/core/modules/parsers/wikiparser/rules/list.js I have cloned this and attempted to edit it.

Certainly it looks like the place to do this but my initial attempts at hacking the js resulted in a dead wiki.

I see the steps as add "." period to the initial characters in the regex
Then  add a list type of  
".": {listTag: "dt", itemTag: "dt"},

Without the `<dl></dl>` wrap so it is not bolded as I want

Can anyone help with a little javascript help?

Basically I want a leading period on any line to be the same as ";" but not "bolded".

Regards
Tony
Reply all
Reply to author
Forward
0 new messages