Page MenuHomePhabricator

Introduce a quoted reply block rule for Remarkup
ClosedPublic

Authored by epriestley on May 2 2014, 5:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 15, 5:35 PM
Unknown Object (File)
Feb 20 2024, 7:43 AM
Unknown Object (File)
Feb 11 2024, 6:17 PM
Unknown Object (File)
Feb 8 2024, 5:50 PM
Unknown Object (File)
Feb 5 2024, 1:03 AM
Unknown Object (File)
Jan 14 2024, 1:45 PM
Unknown Object (File)
Jan 14 2024, 1:45 PM
Unknown Object (File)
Jan 14 2024, 1:45 PM

Details

Summary

Ref T4119. The tricky part here is that it's desirable to preserve other block-level formatting elements (like lists, other quotes, etc) inside the block.

To permit that, allow block-level elements to reparse their contents into more block-level elements, and essentially build a parse tree.

The new ReplyBlockRule strips off the ">>!" header and the ">" prefixes, then renders the rest normally, then slaps a blockquote around everything.

I haven't tweaked the styles too much, @chad might have thoughts on that. There should be enough tags/classes to get things rendering pretty flexibly.

I'm probably going to make the normal quote style work like this too (so block-level elements inside it are preserved). A big thing this will help with is inline replies into these blocks. This might imply keeping both quote styles relatively similar.

The selection of ">>!" is arbitrary, but I want some unique marker to indicate the meta/header text. This seemed as good as any.

Test Plan

Screen_Shot_2014-05-02_at_10.08.15_AM.png (843×628 px, 52 KB)

Diff Detail

Repository
rPHU libphutil
Branch
subblock
Lint
Lint Passed
SeverityLocationCodeMessage
Auto-Fixsrc/markup/engine/__tests__/remarkup/reply-basic.txt:12TXT9Trailing Whitespace at EOF
Auto-Fixsrc/markup/engine/__tests__/remarkup/reply-nested.txt:50TXT9Trailing Whitespace at EOF
Unit
Tests Passed
Build Status
Buildable 201
Build 201: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Introduce a quoted reply block rule for Remarkup.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, chad.
epriestley added a subscriber: chad.
btrahan edited edge metadata.
This revision is now accepted and ready to land.May 2 2014, 7:08 PM
epriestley updated this revision to Diff 21309.

Closed by commit rPHUb88b8ba78580 (authored by @epriestley).