Homec4science

Make inline remarkup rules have explicit priority

Authored by epriestley <git@epriestley.com> on Jul 1 2013, 21:27.

Description

Make inline remarkup rules have explicit priority

Summary:
Currently, inline remarkup rules have implicit priorities (based on the order they're added in). Priority is important; some rules need to apply before other rules.

We just kind of always add them in the right order currently, but this is error prone and creates a concrete problem in Phabricator, where we want applications to be able to add rules with both higher and lower priorities than the hyperlink rule (e.g., "http://example.com/D123" should not link as "D123", so the object rule should run later -- but "https://app.asana.com/..." should link as an Asana object, so the Asana rule should run earlier).

Allow rules to have explicit priorities so the order they're added in doesn't matter.

Test Plan: This just makes the current implicit order explicit. Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6329

Details

Committed
epriestley <git@epriestley.com>Jul 1 2013, 21:27
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU15879abc4919: Shut down active write guard on exit
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUdbbda011392b: Make inline remarkup rules have explicit priority (authored by epriestley <git@epriestley.com>).Jul 1 2013, 21:27