Ticket #685 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months 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 21 months ago.
this fix also takes care of PrettyLinks? and image markup within slice values
ticket685_tests.patch Download (2.5 KB) - added by FND 21 months ago.
added new and updated existing tests

Change History

Changed 21 months ago by FND

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

Changed 21 months ago by FND

  • description modified (diff)

Changed 21 months 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 21 months ago by FND

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

Changed 21 months ago by FND

added new and updated existing tests

Changed 21 months ago by FND

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

Changed 21 months 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.