Texy\Texy::protect PHP Method

protect() final public method

Generate unique mark - useful for freezing (folding) some substrings.
final public protect ( $child, $contentType ) : string
return string internal mark
    public final function protect($child, $contentType)
    {
        if ($child === '') {
            return '';
        }
        $key = $contentType . strtr(base_convert(count($this->marks), 10, 8), '01234567', "") . $contentType;
        $this->marks[$key] = $child;
        return $key;
    }