Homec4science

Make XHPASTSyntaxHighlighter more robust

Authored by Alan Huang <alanh@fb.com> on Aug 10 2012, 00:18.

Description

Make XHPASTSyntaxHighlighter more robust

Summary:

  • Also store symbol name as a DOM attribute, to allow cases where the symbol name isn't simply the text content of the <span>.
  • Check for interesting symbols first, to allow cases where the symbol doesn't have type T_STRING.

These changes support new features internal to Facebook, though they
also seem worthwhile in their own right.

Test Plan: Browse Diffusion. Examine DOM.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

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

Details

Committed
Alan Huang <alanh@fb.com>Aug 10 2012, 00:18
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU209338c418d4: Add context support to PHP highlighter
Branches
Unknown
Tags
Unknown

Event Timeline

Alan Huang <alanh@fb.com> committed rPHU812b204f269e: Make XHPASTSyntaxHighlighter more robust (authored by Alan Huang <alanh@fb.com>).Aug 10 2012, 00:18