Changeset View
Changeset View
Standalone View
Standalone View
src/markup/engine/remarkup/PhutilRemarkupBlockStorage.php
| Show All 24 Lines | |||||
| * <em><a href="http://...">...</a></em> | * <em><a href="http://...">...</a></em> | ||||
| * | * | ||||
| * If we didn't do this, the italics rule could match the "//" in "http://", | * If we didn't do this, the italics rule could match the "//" in "http://", | ||||
| * or any other number of processing mistakes could occur, some of which create | * or any other number of processing mistakes could occur, some of which create | ||||
| * security risks. | * security risks. | ||||
| * | * | ||||
| * This class generates keys, and stores the map of keys to replacement text. | * This class generates keys, and stores the map of keys to replacement text. | ||||
| */ | */ | ||||
| final class PhutilRemarkupBlockStorage { | final class PhutilRemarkupBlockStorage extends Phobject { | ||||
| const MAGIC_BYTE = "\1"; | const MAGIC_BYTE = "\1"; | ||||
| private $map = array(); | private $map = array(); | ||||
| private $index; | private $index; | ||||
| public function store($text) { | public function store($text) { | ||||
| $key = self::MAGIC_BYTE.(++$this->index).'Z'; | $key = self::MAGIC_BYTE.(++$this->index).'Z'; | ||||
| Show All 36 Lines | |||||