In preparation for the big extraction of Parsoid out of VisualEditor,
we'll start by moving the tests into the parsoid location.
Change-Id: I4a926ee4aad1490d4f769d44e91af80842b881f0
* Got rid of mergeProperties monkey-patch from core-upgrade.
* Reformatted class defns in mediawiki.parser.defines.js.
* Protected unconditional tokenization of list handler output with an
env.trace check.
* Other minor formatting fixes to respect 80-100 column code width
guideline.
Change-Id: Ida769e0e239b01a813b2d30a65aba60216262a43
* the used RDFa types for links are now identical to those listed in
http://www.mediawiki.org/wiki/Parsoid/RDFa_vocabulary, and are supported for
serialization
* Editors are responsible for adjusting the type when converting between link
types. Adding a caption to an mw:UrlLink for example should convert it into
an mw:ExtLink.
Update: rebased on top of trace patches
Change-Id: Ie1b882e2b3fbad08be94769e1167dccd8dfea65d
* Source-based round-tripping now uses typeof="mw:Placeholder" instead of
data-gen.
* mw:Image is supported for round-tripping, but not yet for modifications as
it is still source-based
Change-Id: Ie5cf4e54de0163168c25c2b5c09380657a15970f
* changes:
Additional work on readable tokenizer debug output
Added 'href' key to anonymous KV wikilink and isbn attribute.
Removed utility functions from mediawiki.parser.environment
Added utility methods to ext.Util.js
Added missing var keyword
In trace mode, wrap transform to output trace info
Output chunk tokens to console only in trace mode
Further refinement of readable pretty-printing of tokens.
More fixes on the way to readable debug/trace output.
Added mergeProperties function to Object.prototype
In RTL interface the drop-down arrow overlaps with the text.
The arrow was positioned explicitly in relation to the left margin, and this
can't work in a flipped RTL environment. I changed the position to "right"
and modified the arrow image a bit.
Some visual tweaks to the arrow may still be needed. Another option can be
to convert the image to SVG or to use a character like ▼.
Change-Id: Ib09a2a20b150de6e8a9531fc0db7dfffe4e95525
The current installation instructions suggest reading ParserService.js
to create localsettings.js. Adding this example file should make
the installation a bit easier - the user will simply have to copy
the example file to the target name and edit it.
Also fixed the line ending in the .gitignore entry for localsettings.js.
Change-Id: Ia4f16ac636cbd3473837f439c699e5e3e9950e9e
* This makes wikilink attrs more similar to ext links.
* Added 'content' key to ISBN links, but couldn't add it to regular
wikilinks yet because of complexity of how they are handled in
the rest of the pipeline. Changing this requires fixing up other
parts down the pipeline -- something for later.
* Fixed up wikilink handler to use named lookup for 'href' and
'tail' rather than positional lookup. Content lookup is still
positional as before.
Change-Id: I657b1f338d38df3cfdfa99f27ac46e7fe1c9fd65
* these functions have already been added to ext.Util.js
* removed a couple jshint warnings.
* minor code restructuring in tokensToString and comments
to better indicate what is going on.
Change-Id: I9d6a03cc35075e1a64d8fac9e167a3ce4ccd9424
* Copied over utility methods from mediawiki.parser.environment.js
to ext.Util.js.
* Moved over utility method from mediawiki.parser.defines.js to
ext.Util.js.
* Converted Util to be a singleton object rather than an allocatable
class. There is no reason to allocate a new utility class everywhere
since this utility object has no useful state.
* Fixed up use of utility methods to use Util rather than env.
Change-Id: Ib81f96b894f6528f2ccbe36e1fd4c3d50cd1f6b7
- Added extra debug_name parameter to addTransform which is
used in addTransform to output useful trace info.
Change-Id: I160ba0c45f681149375e32ab19f97baa439b09a8
- Added limits to toolbar float, Toolbar will not go past the last node in editor.
- Added bottom mode to allow toolbar to stick above the last node until the scroll position
is above the last node.
- Actually checking toolbar config now and setting float when flag is set.
- Gave float method for top toolbar a better name.
Change-Id: Ic39c5402fa7a05e13c5e81722d8729d93776d7e9
* changes:
Do not put slugs after nested lists
Split canHaveSlug() into canHaveSlugBefore() and canHaveSlugAfter()
Make Enter in an empty list item unindent
Let Tab and Shift+Tab trigger indentation again
Work around crazy list rendering bug in Firefox
But still put slugs before them. Done by overriding canHaveSlugAfter()
in ve.ce.ListNode.
Eventually this should be configurable and MediaWiki-specific
Change-Id: I5ad15ca4085a2d730add4954acbea358819b3986
These determine whether a node can have a slug before and after,
respectively. The default implementation in ve.ce.Node is to use the
same rules for both, but individual node types can override this.
I'll need this to suppress slugs after nested lists but not before them.
Change-Id: Id88c0fc98aca7c7f52ce990ed9b8c42181ef6d18