Ticket #685 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

calcAllSlices() ignores slices containing pipe characters

Reported by: FND Owned by: FND
Priority: major Milestone: 2.4.1
Component: core Version:
Severity: high Keywords: slices
Cc:

Description (last modified by FND) (diff)

In colon notation, calcAllSlices() does not retrieve slices whose value contains pipe characters (e.g. PrettyLinks? with custom labels):

link: [[target|label]]
image: [img[title|filename]]

Attachments

ticket685.patch Download (0.6 KB) - added by FND 4 years ago.
this fix also takes care of PrettyLinks? and image markup within slice values
ticket685_tests.patch Download (2.5 KB) - added by FND 4 years ago.
added new and updated existing tests

Change History

Changed 4 years ago by FND

  • description modified (diff)
  • summary changed from calcAllSlices() ignores slices containing PrettyLinks to calcAllSlices() ignores slices containing pipe characters

Changed 4 years ago by FND

  • description modified (diff)

Changed 4 years ago by FND

This error occurs because pipes are explicitly excluded in the colon notation: TiddlyWiki.prototype.slicesRE = /(?:^([\'\/]{0,2})~?([\.\w]+)\:\1\s*([^\|\n]+)\s*$)|(?:^\|([\'\/]{0,2})~?([\.\w]+)\:?\4\|\s*([^\|\n]+)\s*\|$)/gm;

Changed 4 years ago by FND

this fix also takes care of PrettyLinks? and image markup within slice values

Changed 4 years ago by FND

added new and updated existing tests

Changed 4 years ago by FND

  • owner changed from JeremyRuston to FND
  • status changed from new to assigned

Changed 4 years ago by MartinBudden

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in changeset:5870

Note: See TracTickets for help on using tickets.