Commit graph

2204 commits

Author SHA1 Message Date
Gabriel Wicke 68c5a6efc6 Collect tokens in a tokencollector and use cb for processing
This is work in progress, but committed for now so I can use it for links and
tweak it while doing so.

Change-Id: I757277f6efacda6d9432ca57542a957f597a98de
2012-07-18 16:18:38 -07:00
Gabriel Wicke 681b0d4d40 Merge "Rename data-mw into data-rt" 2012-07-17 17:20:37 +00:00
Subramanya Sastry 80d74e1c16 Changed add/remove/get transforms.
* This code change is an attempt to address the FIXME about constant
  resorting of transformations in _getTransforms.  This caches sorted
  transformations and selectively clears/updates the cache on add/remove.

Change-Id: If24a807b84d494aa4e5597339039a5573a30905e
2012-07-17 12:03:48 -05:00
Gabriel Wicke 3172afb750 Rename data-mw into data-rt
This hopefully makes it clearer that data-rt contains private round-trip info
instead of semantically interesting data.

Change-Id: I03b476ed112a4b627c9871ee3677c450f943429a
2012-07-16 12:10:08 -07:00
Gabriel Wicke 2faba528aa Strip data-gen in parserTests
Change-Id: I1d3629b4d5487ff8735444069a4004fb74f926ef
2012-07-16 10:37:26 -07:00
GWicke 235739e253 Merge "Bug fix and minor code cleanup." 2012-07-13 22:40:20 +00:00
Subramanya Sastry 141ce901d2 Bug fix and minor code cleanup.
Change-Id: Ic446c8822bf1b8a859e045119782d7b8a40c5544
2012-07-13 17:39:30 -05:00
Gabriel Wicke 1e902fc050 Merge "Encapsulate token collection" 2012-07-13 21:08:52 +00:00
Gabriel Wicke e329455d55 Encapsulate token collection
* Arbitrary predicate support for the termination of collection mode
* tokens as property of the collector instead of a state-global thing

Change-Id: Ibcb342bc64a76fece9b04a760ea56c7878e67cad
2012-07-13 13:57:04 -07:00
GWicke 97bc6cd5d7 Merge "Serializer fixes" 2012-07-13 20:36:36 +00:00
Subramanya Sastry f4c6ba8545 Serializer fixes
* Fixed image serializer to deal with missing 'v' value in a k-v pair
  representing an image attribute.
* Added fix to deal with bare <li>'s (without surrounding <ul> tags)

NOTE: The second fix is required currently to deal with bugs in the parser
as it deals with complex cases.  But, in the future, we could deal with
this in one of the following ways:
(a) The serializer expects a well-formed DOM and all cleanup will be
    done as part of external tools/passes.
(b) The serializer supports a small set of exceptional cases and bare
    list items could be one of them
(c) The serializer ought to handle any DOM that is thrown at it.

Yet to be resolved.

Change-Id: Ib585e5c9f2a8a80854740ce0211bde705f9fd6f4
2012-07-13 15:33:09 -05:00
GWicke a742ec5ffc Merge "Fixed parser and serializer to deal with a 4+ length dash sequence." 2012-07-13 20:14:34 +00:00
Subramanya Sastry 49ed0d3adf Fixed parser and serializer to deal with a 4+ length dash sequence.
Change-Id: If7caaefec1ad55e7604712ef959ff0c843392adf
2012-07-13 15:12:09 -05:00
Gabriel Wicke 65eed350bd Merge "Make the parser service slightly more robust against serializer failures" 2012-07-11 10:04:18 +00:00
Gabriel Wicke 64d2a089d8 Make the parser service slightly more robust against serializer failures
Change-Id: I50624a56fd0319f6acb6fd1c171c7c6f92a97d31
2012-07-11 12:01:05 +02:00
Translation updater bot c23dc455bd Localisation updates from http://translatewiki.net.
Change-Id: If3eb2da9334602f2faad227bf1dbd43047d244e0
2012-07-11 07:27:59 +00:00
Reedy ebcd6d2941 Merge "Add Christian, Rob and Subbu to the extension authors list" 2012-07-07 20:54:26 +00:00
Catrope d8fa2dfbee Merge "Bug 37811 - VisualEditor: editing toolbar float trigger also triggers contextView icon, although there is no context to act on -Remove unused updateContext method. -Added check for selection length in contextView set method." 2012-07-07 15:49:45 +00:00
Rob Moen b71586f296 Bug 37811 - VisualEditor: editing toolbar float trigger also triggers contextView icon, although there is no context to act on
-Remove unused updateContext method.
-Added check for selection length in contextView set method.

Change-Id: I1d5791c69deea80c54cff3e021ba4c90cdac2cc4
2012-07-07 08:47:51 -07:00
Catrope ca868f6cb6 Merge "Bug 38008 - VisualEditor: Tooltips for formatting menu are broken Fixed inconsistency with message name being used for format dropdown" 2012-07-07 15:46:27 +00:00
Catrope a2058c97c3 Add Christian, Rob and Subbu to the extension authors list
Change-Id: Ifc2d683e510b3f6e76037ac67a559586fc971dc5
2012-07-06 22:01:04 -07:00
Catrope 970873595b Merge "Made extendClass accept a variadic list of base classes to extend with" 2012-07-07 04:31:48 +00:00
Catrope b4b9634e76 Merge "Added feedback button to toolbar" 2012-07-07 04:30:44 +00:00
Catrope 0247a0a211 Merge "Updated Readme to have sane content" 2012-07-07 04:29:19 +00:00
Catrope 82fbb943df Merge "Removed unused variables" 2012-07-07 04:24:52 +00:00
Catrope bf886937bf Merge "Fix link inspector css in new version of chrome. Chrome engine modifies CSS names to lowercase when inside iframe..." 2012-07-07 02:05:06 +00:00
Catrope bc0c8ae525 Merge "Rename ve.ce.BranchNode.doSlugs -> ve.ce.BranchNode.addSlugs" 2012-07-07 02:04:17 +00:00
Trevor Parscal 12b8818a02 (bug 37848) Fixing delete key at end of document, removing whitespace.
Change-Id: I64cc9e7a3251b7326b104cd3b8ecb0d07240cd77
2012-07-06 19:02:01 -07:00
Rob Moen 74ab4688cc Bug 38008 - VisualEditor: Tooltips for formatting menu are broken
Fixed inconsistency with message name being used for format dropdown

Change-Id: Id1e3dd1fe61177d7592b449e227ef2527f4d30a1
2012-07-06 16:28:16 -07:00
Rob Moen b345915d0f Fix link inspector css in new version of chrome.
Chrome engine modifies CSS names to lowercase when inside iframe...

Change-Id: I9cd8ccba011d82549ad71acd2b18c6241ec47ca4
2012-07-06 14:50:19 -07:00
Translation updater bot 9074309e51 Localisation updates from http://translatewiki.net.
Change-Id: I290bb2718632f30a58eb7b9f58fbc9abe8ba86f2
2012-07-06 21:23:01 +00:00
Inez Korczynski d4bfa89b32 Rename ve.ce.BranchNode.doSlugs -> ve.ce.BranchNode.addSlugs
Change-Id: I162067be5a544817e36986eeb0acd0497d37f443
2012-07-05 16:55:45 -07:00
Subramanya Sastry e529ae7e0e Serializer fix for empty headings (BUG-33089)
Change-Id: Ia7b018335ac9e31938052473fc47ce38443fdeb4
2012-07-05 16:50:48 -05:00
Translation updater bot dad16b3761 Localisation updates from http://translatewiki.net.
Change-Id: I0f7baec21f97895e08f640177734433b01e89e81
2012-07-04 20:11:25 +00:00
Translation updater bot 4fea35acd4 Localisation updates from http://translatewiki.net.
Change-Id: I8557e0cb1952664163beaed7cf71c64116808e10
2012-07-02 22:16:50 +00:00
Siebrand 5b7c2e1c4a Merge "Removed playground" 2012-07-01 14:41:43 +00:00
GWicke 46d6502ca5 Merge "Fix for Bug 37913" 2012-06-30 08:56:48 +00:00
Gabriel Wicke 1736e52bfb Abstract out chunk emission from tokenizer
Patch by Adam Wight, fixes bug #35377.

Change-Id: I183baeed8dd78e7d3c775f44d62bec8e6f9fc608
2012-06-30 10:39:12 +02:00
Subramanya Sastry 166e7a75c9 Fix for Bug 37913
* Strips the first paragraph tag in a list item or table cell context
  if there are no attributes on it and stx:html is not set

Change-Id: I74988645fe505c662f86488e32d0f11d464ffe41
2012-06-29 23:47:59 -05:00
Gabriel Wicke 604aae2f3f Merge "Up entity name length limit even further" 2012-06-29 21:39:54 +00:00
Gabriel Wicke 9ddc863d89 Up entity name length limit even further
There are some really long names in
http://www.w3.org/2003/entities/2007xml/unicode.xml

Change-Id: I0138c9610bb288cd8f29e3600b8a21f932e7bcd9
2012-06-29 23:38:10 +02:00
Gabriel Wicke 5c12dae254 Merge changes I2c9f102f,I55aa649b
* changes:
  Match named entities with up to eight chars
  Insert separation between adjacent pres
2012-06-29 21:25:07 +00:00
Gabriel Wicke cf7f437966 Match named entities with up to eight chars
The longest entries in
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references.

Change-Id: I2c9f102fe6a905e339e12520d08c1b1b0a4002d8
2012-06-29 23:15:30 +02:00
Gabriel Wicke da4a2e13d1 Merge "Escape ampersands in entities from plain text DOM content" 2012-06-29 21:11:23 +00:00
Gabriel Wicke 370fb607c8 Insert separation between adjacent pres
Change-Id: I55aa649b4e076cae32b3c970d6384ab2ed4cdd6c
2012-06-29 23:05:06 +02:00
Gabriel Wicke 6c8dfa26fa Escape ampersands in entities from plain text DOM content
Change-Id: I0826077cf48b67e38a525090be66411c38d7b65f
2012-06-29 23:02:21 +02:00
Translation updater bot 5fd82a18ab Localisation updates from http://translatewiki.net.
Change-Id: If6dab08c26f7c6b8d136c6c530171c2ecc989b77
2012-06-29 20:18:16 +00:00
Subramanya Sastry 5874d9a5f1 More thumb roundtripping fixes.
* Looks like I misled myself in commit 88fc91 -- that wikitext
  roundtripped perfectly because it went through the 'src' route
  because it was a thumbnail with an explicit image which doesn't
  go through renderThumb -- so, the serializer simply spit out the
  original 'src' string and hence perfect rt :).
* More whitespace preserving fixes in LinkHandler.
* Also changed resource value in the img tag to use the original
  filename rather than the normalized capitalized filename.
* 2 more parsertests rt -- now upto 400.

Change-Id: I144a6486dd9d07da8a74a68700fe96c78d192826
2012-06-29 00:30:13 -05:00
Subramanya Sastry ba6a304102 Prettified Wikitext Constants hash
* Something to be said for code alignment - easier on the eye!
* Maybe a good case for breaking mediawiki coding guidelines.
* But, happy to abandon commit if not useful. :)

Change-Id: I1133af488f572ac7f8727be9108e08e14c4e6420
2012-06-28 19:08:48 -05:00
Subramanya Sastry 88fc91a292 Next round of image roundtripping fixes
* Changed PrefixImageOptions so that thumb and thumbnail are
  distinct key-value pairs.  Without this fix, cannot distinguish
  between thumb=foo.jpg and thumbnail=foo.jpg
* Fixed link handler so whitespace is preserved around prefixed image
  options.
* Fixed figure handler to process the 3 different kind of image options:
  size, simple image options, and prefixed image options.
* There is a hack/fixme for "upright: aspect" prefixed image option
  which needs to be looked into.
* Still need to fix uppercasing of the image resource name.

With these fixes, the following wikitext roundtrips perfectly
(after newline breaks are removed)

[[Image:Foo.jpg|thumbnail = 'baby.jpg'|100x100px|center| alt =bbbbb|
upright=true|bottom|link='http://foo.bar'|
This is a [[Linked Caption]] in the image]]

Change-Id: I6606df56874c2b97f00f08cb6bbeaec9878167d3
2012-06-28 18:55:47 -05:00