Commit graph

8 commits

Author SHA1 Message Date
Subramanya Sastry dbd628fd87 Added getWTSource convenience method to tokens.
Change-Id: I8c99fcd4ccefbae62a1639e5738fe2d4c88f122a
2012-09-06 09:29:38 -07:00
Subramanya Sastry 67326f063a Check if tsr is present in references tokens before generating src rt-info.
* Only one instance of Cite handler is created and it deals with the
  final expanded token stream.  So, effectively there is no information
  about whether we are processing in a top-level or nested template
  context.  So, we instead use tsr.

Change-Id: I002f421fc78576e869cc8fbcdc386ef0abb09ca9
2012-09-05 19:48:08 -05:00
Subramanya Sastry d3f0007f1b Updates to the references tag rt-ing to get rid of FIXMEs.
Change-Id: I8b832925ad476fb8043f9beb1e39e6efb27ea336
2012-09-04 20:53:33 -05:00
Subramanya Sastry 23f3e0f1aa RT references extension tag.
Change-Id: Ibd1be584e17814a84154549b7bc353465734b847
2012-09-04 20:07:26 -05:00
Subramanya Sastry ca04fdc293 Experimental ref-tag support (for demoing purposes).
* Added template-wrapping information in cite-expansion with
  Object/Ext/Cite RDFa type.
* Added 'ref' tag to whitelisted tags (temporary workaround to
  let <ref name='blah' /> to RT correctly till we handle this
  properly).
* Added support for self-closing, but non-void tags.
* Deleted Object/Template/Content type attribute since it was
  not used.
* Renamed Object/Template/Attributes to ExpandedAttrs/Template
  to distinguish template attribute code paths from content
  code paths -- could possibly be renamed to something more
  suitable later on.

Results:
- With this experimental support, RT diffs on the en:Barack_Obama
  page are vastly reduced.

Change-Id: I018f03df102764d3e39442ae359b751056a38c2f
2012-09-04 18:51:29 -05:00
Subramanya Sastry f733af93c4 Code cleanup.
* Moved tokensToString and KVtoHash from parser.environment
  to Util -- got rid of excessive warnings from tokensToString.
* Replaced used of Util.lookupKV(blah).v with Util.lookup(blah)

Change-Id: Ic48d5d0c79045b9789dc61a2b14df3fc2acf7aa5
2012-08-24 15:29:53 -05:00
Subramanya Sastry 2d15258803 Fixed template meta-wrapping to handle nesting and attributes.
* Nested parser functions are no longer meta-wrapped similar to
  nested templates.
* HTML attributes which derive all or part of their key/value
  from a template are not template-wrapped, but are marked to
  be tracked via different rdfa meta attributes.  The actual
  tracking and addition of new meta attrs. is yet to be
  implemented.
* Parser pipeline construction updated to use an options object
  rather than individual option args -- used to support the two
  features above.
* With this fix, we can now distinguish between the following
  scenarios:

  Templates:
  - {{echo|[[Foo|bar]]}} -- regular wrapping of the entire link
  - [[{{echo|Foo}}|bar]] -- no wrapping, but href marked for tracking
  - [[Foo|{{echo|bar}}]] -- link text is wrapped.

  Parser functions:
  - {{uc:foo}} -- regular wrapping.
  - {{uc:{{lc:{{uc:foo}}}}}} -- only the top-level parser function
    is wrapped, the nested lc and uc parser functions are not.

Change-Id: I512b8de9838ad42d9255ebcd73074b3898294cd8
2012-08-19 15:21:36 -05:00
Gabriel Wicke 4900d85606 Reorganize Parsoid repo after split from VisualEditor
* /js/ for JavaScript / nodjs implementation
* /js/lib for js modules
* /js/tests for js test runners and unit tests

Change-Id: I7da1ea2a62b9312be0f1b492447340427f6a14fb
2012-07-30 13:10:22 -07:00