Git Product home page Git Product logo

wikitext's People

Contributors

mike42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wikitext's Issues

Link without destination causes PHP warning

A minimal example is:

    [[foo=bar]]

Discovered with the following markup, with a backend which expands "ex:".

    {{ex:113} {{ex:122}} {{ex:119}}

Detail: This causes it to look for a template called "ex:113} {{ex:122", which is bogus, so the custom getTemplateMarkup("ex:113} {{ex:122") returns "[[ex:113} {{ex:122]]". From here, the template on the right is expanded and returns HTML markup. The markup contains '=', so is treated as variable-argument (like [[image:foo|width=2em]]), and the back-end attempts to render this:

    [[ex:113}  <whatever class="...">...</whatever>]]

Triggering the PHP warning:

    Notice: Undefined offset: 0 in WikitextParser.php on line 905

Parser does not remove HTML comments

Example of this causing problems:

    Beeble:
    * Foo
    ** Bar
    <!-- Baz -->
    ** Quux

The comment is rendered in its own paragraph (like 'Beeble' is), and this produces two list structures, rather than one.

processArgs() crash

An unclosed external link causes:

Fatal error: Call to undefined method (backend class)::processArgs() in /home/mike/workspace/samoan/vendor/wikitext/WikitextParser.php on line 414

Incorrect handling of ambiguities with bold / italic syntax

Because the parser checks for close-tags before it checks for new open-tags, this sequence will render as if the italics were closed originally:

normal text ''italic text '''bold inner text''' still italic '' back to normal

Tags need to be evaluated in descending order of length, regardless of whether they are open or close tags.

Composer package

As a developer who wants to use this package
I want to include it as a Composer dependency
So that it works like all the other libraries out there.

--

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.