Ref T3116. This is basically the NOTE: rule except we consume WARNING and IMPORTANT.
Also adds (X) syntax for all three of (NOTE), (WARNING), and (IMPORTANT), which behave like the colon versions, just eating the keywords in html rendering.
Differential D8052
Add WARNING and IMPORTANT to remarkup btrahan on Jan 23 2014, 11:24 PM. Authored by Tags None Referenced Files
Subscribers
Details
Ref T3116. This is basically the NOTE: rule except we consume WARNING and IMPORTANT. Also adds (X) syntax for all three of (NOTE), (WARNING), and (IMPORTANT), which behave like the colon versions, just eating the keywords in html rendering. played with it in phabricator proper; see next diff. also wrote a unit test
Diff Detail
Event TimelineComment Actions src/parser/xhpast/parser_nodes.php is updated because arc warned me it was out of date. i just followed the rebuild instructions and here we are. Comment Actions One thing I've vaguely wanted is to have "WARNING" (yellow) and "IMPORTANT" (red) like NOTE. It would be nice to have a more semantic name for BUBBLE so it makes more sense when rendered in plain text, although I can't think of one offhand (CALLOUT or SIDEBAR aren't quite right). Maybe SIDENOTE, although that's not a word. Another thought is that maybe we should just style NOTE the right way in legalpad? Or have a syntax which eats the word "NOTE", like: (NOTE) asdf asdf asdf So maybe:
Not sure if there's more ground to cover than that. Comment Actions That is also all just me making stuff up if it's terrible or whatever, I haven't really spent much time thinking about this beyond wanting WARNING and IMPORTANT. Comment Actions changes as suggested my tests currently pass, but I feel like the 3 returns in the 2 types of output is weird? afaik its something about how we render block rules back to back though? Comment Actions Oh, I also added (X) syntax for Note, Warning, and Important. I think its important to eat that text in the legalpad case at least / I'd be likely to use it a bit I think... If we can eat words in CSS though I'd be happy to just do that for legalpad and simplify this a bit. Comment Actions
Oh -- I think maybe the rule could/should be consuming more whitespace in getMatchingLineCount(), and we're ending up with "note block, empty block, note block" or something. Getting it to consume extra whitespace at the end (and then trimming that in non-text modes) might fix things, maybe. But I woudn't worry about it too much. |