Coder Social home page Coder Social logo

wikimodel's People

Watchers

James Cloos avatar

wikimodel's Issues

error in CommonSyntaxParser

    @Test
    public void testBug1() throws IOException, WikiParserException {
        String in = "The link can also be a direct URL starting 
with {{http:}}, {{ftp:}}, {{mailto:}}, {{https:}}, or {{news:}}, in which 
case the link points to an external entity. For example, to point at the 
java.sun.com home page, use {{[[http://java.sun.com]}}, which becomes 
[http://java.sun.com/] or {{[[Java home page|http://java.sun.com]}}, which 
becomes [Java home page|http://java.sun.com].";
        IWikiParser wikiParser = new CommonWikiParser();

        IWemListener listener = new PrintListener(new 
NullPrinter());
        wikiParser.parse(new StringReader(in), listener);
    }

    class NullPrinter implements IWikiPrinter {

        public void print(String str) {
            // TODO Auto-generated method stub

        }

        public void println(String str) {
            // TODO Auto-generated method stub

        }

    }

Original issue reported on code.google.com by [email protected] on 19 Dec 2007 at 12:29

XHTML parser does not consider quotes (") as a special symbol

Input:

<p>This is &lt;a href=&quot;url&quot;&gt;some HTML&lt;/a&gt;.</p>

Expected events:

beginDocument
beginParagraph
onWord: [This]
onSpace
onWord: [is]
onSpace
onSpecialSymbol: [<]
onWord: [a]
onSpace
onWord: [href]
onSpecialSymbol: [=]
onSpecialSymbol: ["]
onWord: [url]
onSpecialSymbol: ["]
onSpecialSymbol: [>]
onWord: [some]
onSpace
onWord: [HTML]
onSpecialSymbol: [<]
onSpecialSymbol: [/]
onWord: [a]
onSpecialSymbol: [>]
onSpecialSymbol: [.]
endParagraph
endDocument

Got:

beginDocument
beginParagraph
onWord: [This]
onSpace
onWord: [is]
onSpace
onSpecialSymbol: [<]
onWord: [a]
onSpace
onWord: [href]
onSpecialSymbol: [=]
onWord: ["url"]
onSpecialSymbol: [>]
onWord: [some]
onSpace
onWord: [HTML]
onSpecialSymbol: [</]
onWord: [a]
onSpecialSymbol: [>.]
endParagraph
endDocument

Original issue reported on code.google.com by [email protected] on 17 Aug 2008 at 2:16

XHTML Parser skips paragraph word

Hi,

I'm passing the following to the xhtml parser:

<p>hello <em class="italic">beautiful</em> <strong>world</strong></p>

And I get the following events (XWiki events but they're mapped to
wikimodel events):

beginParagraph
onSpace
onSpace
beginItalic
onWord: [beautiful]
endItalic
onSpace
beginBold
onWord: [world]
endBold
endParagraph

It should be:

beginParagraph
onWord: [hello]
onSpace
beginItalic
onWord: [beautiful]
endItalic
onSpace
beginBold
onWord: [world]
endBold
endParagraph

As you can see the "hello" world has disappeared.

Any idea?

Thanks
-Vincent

Original issue reported on code.google.com by [email protected] on 20 Jun 2008 at 10:22

Wikimodel swallows "\\" characters for the xwiki syntax

For example having this as an input source:

{nowiki}
* this is not a list and this is not *bold*
[not a link]
\\ <-- not a newline
{/nowiki}

Generates an onMacro event with the following content:

* this is not a list and this is not *bold*
[not a link]
 <-- not a newline

(note the missing \\)


Original issue reported on code.google.com by [email protected] on 27 Jul 2008 at 8:31

Converter to CommonSyntax from XHTML

I can convert my existing wiki pages to XHTML, but then I cannot use 
WikiModel (yet) - I need a converter to CommonWikiSyntax.

Storing content as XHTML is also more convenient than storing as wiki 
syntax.

Original issue reported on code.google.com by [email protected] on 19 Dec 2007 at 10:48

The "**bold**" sequence is recognized as a list

What steps will reproduce the problem?
Create a "\n**bold" sequence and try to parse it using the CommonWikiParser

What is the expected output? What do you see instead?
The sequence above is recognized as a list of the second level, and not as
a strong formatted text in a paragraph.

All sequences "\n** xxx" should be recognized as item markups and
"\n**strong" as a bold formatting  switchers.


Original issue reported on code.google.com by [email protected] on 27 Nov 2007 at 5:41

MediaWikiParser - Image with link in the legend

The wiki text below produces the XHTML underneath when parsed by
MediaWikiParser and serialized by the default Printlistener. Not sure about
how the reference should look like when it contains another reference, but
the reference identified by the parser looks wrong in any case, doesn't it?

Wiki text:

[[Image:Jerry Yang and David Filo.jpg|thumb|right|250px|Yahoo! co-founders
[[Jerry Yang (entrepreneur)|Jerry Yang]] (left) and [[David Filo]] (right)]]

Resulting XHTML:

<a href='[Image:Jerr'>[Image:Jerr</a> Yang and David
Filo.jpg|thumb|right|250px|Yahoo! co-founders <a href='Jerry Yang
(entrepreneur)|Jerry Yang'>Jerry Yang (entrepreneur)|Jerry Yang</a> (left)
and <a href='David Filo'>David Filo</a> (right)]]

Stéphane

Original issue reported on code.google.com by [email protected] on 1 Nov 2007 at 6:32

CreoleParser - The grammar for lists is wrong

The grammar for lists is wrong.  Wiki Creole specifies lists like:
{{{
* item
** nested item
* next item
}}}
With leading whitespace being ignored.

It looks like your current Creole grammar requires at least one initial
blank and nesting is done like this:
{{{
 * item
  * nested item
 * next item
}}}

See http://wikicreole.org/wiki/Creole1.0

Original issue reported on code.google.com by [email protected] on 7 Jan 2008 at 12:22

Change quotation support for XWiki parser

Hi,

On the xwiki lists we have voted to change the quotation symbol from space
(the current wikimodel symbol for the xwiki parser) to ">".

Could this be modified please?

Vote thread: 
http://xwiki.markmail.org/search/?q=[Rendering]%20Wiki%20syntax%20for%20quotes%2
0and%20block%20quote%3F#query:[Rendering]%20Wiki%20syntax%20for%20quotes%20and%2
0block%20quote%3F+page:1+mid:pl3vtrg2l2wbkqqh+state:results

Thanks

Original issue reported on code.google.com by [email protected] on 22 Aug 2008 at 7:44

xhtmlparser don't handle the target of rel attribute of link tag <a>

Input <html><a href="url" ref="_blank">link</a>
The output of the parser only handle the href and label, but miss the rel.

This because in XhtmlHander, the code about <a> only handle the href and
label. Even though in WikiReference, there is 
private final WikiParameters fParameters to store the rel or target
information, but this is never used in parser and ReferenceHandler.

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 4:55

Creole wiki syntax cannot support image

Current version, I cannot find the "image" implementation in creole wiki,
in the parsers and tests.

Creole image label is: {{myimag.png|This is my image alt text}}
ref to:  http://www.wikicreole.org/wiki/Creole1.0#section-Creole1.0-ImageInline

thanks.

Original issue reported on code.google.com by fajaven on 6 Aug 2008 at 1:55

Confusion about WikiModel's home page

Google search for "wikimodel" currently shows the WikiModel SourceForge
project page as first result. I assume, SourceForge is the old home of
WikiModel and the new one is Google Code.

I suggest to put a noticeable comment on the SourceForge project page,
which states that the project has moved to Google Code. This might avoid a
lot of confusion.

Original issue reported on code.google.com by [email protected] on 16 Jan 2008 at 12:38

XhtmlHandler - uses * for ordered list items

The XhtmlHandler does not track what type of list it is in (i.e. ordered vs
unordered) so it always uses '*' for list items.  It needs to be changed to
use '*' for unordered lists and '#' for ordered lists.  XhtmlHandler should
maintain a stack of list types to track which character to use for list items.

Original issue reported on code.google.com by [email protected] on 17 Jan 2008 at 3:48

XHtmlParser - iWemListener.beginTableCell never passed true for tableHead parameter

I parsed the following XML with XhtmlParser:
<table><tbody>
  <tr><th>header col1</th><th>header col2</th></tr>
  <tr><td>col1</td><td>col2</td></tr>
  <tr><td>you         </td><td>can         </td></tr>
  <tr><td>also        </td><td>align<br /> it. </td></tr>
</tbody></table>

When the iWemListener gets called at beginTableCell, it should get passed
true for the boolean for the <th> elements.  This parameter is always false.

Original issue reported on code.google.com by [email protected] on 9 Jan 2008 at 8:22

XHTML Parser calls onReference() event with strange raw link value

If I send the following:

<a href="/xwiki/bin/view/Space/ExistingPage">Space.ExistingPage</a>

the onReference(String) method is passed
"/xwiki/bin/view/Space/ExistingPage Space.ExistingPage" which looks
strange: it has both the URL and the label separated by a space.

Since you're introducing a new WikiReference class I guess in the future
"/xwiki/bin/view/Space/ExistingPage" will be set as the link value and
"Space.ExistingPage" as the label, right?

Thanks

Original issue reported on code.google.com by [email protected] on 26 Jun 2008 at 3:31

WikiEntityUtil - Apostrophe rendered as &rsquo; instead of &#39;

WikiEntityUtil translates the "'" (apostrophe) character to the entity
"&rsquo;".  This entity is not recognized by the SAX parser if you feed it
the HTML generated by WikiModel.  I believe that WikiEntityUtil should be
changed to map this character to "&#39;" which the SAX parser handles
correctly.

Original issue reported on code.google.com by [email protected] on 8 Jan 2008 at 4:41

mvn install for org.wikimodel.wem has two test failures

With the latest code, I get 2 test failures when I try to run mvn install
from the org.wikimodel.wem directory.  If I am interpreting the output
correctly the failures occur when running
org.wikimodel.wem.test.CreoleWikiParserTest and
org.wikimodel.wem.test.CommonWikiParserTest

If there's something I can do to provide more meaningful output, please let
me know.

I've attached the output from the Maven build.


Original issue reported on code.google.com by [email protected] on 8 Jan 2008 at 6:53

Attachments:

XHTML parser chokes when there's a XML declaration

Input:

<?xml version="1.0" encoding="UTF-8"?>
<html><head /><body>one two three</body></html>

Output:

beginDocument
beginParagraph
onWord: [one]
onSpace
onWord: [t]
onWord: [wo]
onSpace
onWord: [three]
endParagraph
endDocument

Expected:

beginDocument
beginParagraph
onWord: [one]
onSpace
onWord: [two]
onSpace
onWord: [three]
endParagraph
endDocument

If I remove the <xml> declaration it works just fine.

Thanks

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 8:29

XHTML parser should generate an onEmptyLines(1) event when 2 paragraphs are next to each other.

Input:

<html><p>this is one<br/>paragraph</p><p>this is another one</p></html>

Expected events:

beginDocument
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [one]
onLineBreak
onWord: [paragraph]
endParagraph
onEmptyLines: [1]
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [another]
onSpace
onWord: [one]
endParagraph
endDocument

Got:

beginDocument
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [one]
onLineBreak
onWord: [paragraph]
endParagraph
beginParagraph
onWord: [this]
onSpace
onWord: [is]
onSpace
onWord: [another]
onSpace
onWord: [one]
endParagraph
endDocument

As you can see it's missing the onEmptyLines event.


Original issue reported on code.google.com by [email protected] on 28 Aug 2008 at 6:40

XHtmlParser - iWemListener not called for nested lists

I attempt to parse the following html with the XhtmlParser:
<ul>
  <li>item a</li>
  <li>item b</li>
  <li>item c</li>
  <ul>
      <li>item c.a</li>
  </ul>
</ul>

I would expect the listener calls to be something like:
beginList();
beginListItem(); endListItem();
beginListItem(); endListItem();
beginListItem(); endListItem();
beginList(); // start of nested list
beginListItem(); endListItem();
endList();   // end of nested list
endList();

I do not see the nested beginList() and endList() calls.  I do not know if
this problem is isolated to the XhtmlParser, or if it is more of a general
problem with the way wem handles nested lists.  

Once I get the updated jars (either built or sent to me) that include fixes
for handling the Creole markup for nested lists, I can test nesting from
that direction.  For example in Creole, the above list should be:

* item a
* item b
* item c
** item c.a

Original issue reported on code.google.com by [email protected] on 9 Jan 2008 at 4:22

Adding support for link parsing

Right now wikimodel doesn't parse the content of links (references). It's a
pity since it makes using the different wiki syntaxes hard.

For example xwiki's links can be [label>link] or [label|link].

The link syntax is part of the wiki's syntax so it would make sense to me
if wikimodel also supported parsing the links.

Right now we're going to have to write 4 new link parsers in the xwiki
project in order to support all syntaxes (wiki, creole, jspwiki, mediawiki).

Thanks
-Vincent

Original issue reported on code.google.com by [email protected] on 6 Jun 2008 at 3:03

XhtmlHandler - no TagHandler for <br />

There is no TagHandler added for the <br /> element, so the
WikiScannerContext is never called at onLineBreak() when the html contains
this element.  I added a handler in my copy of XhtmlHandler right after the
handler for <hr />, and it seems to fix the problem.

Original issue reported on code.google.com by [email protected] on 14 Jan 2008 at 8:54

XHTML parser doesn't handle the <img> tag

I use XhtmlParser + EventDumpListener. 
the input is 
"<html><body><img src=\"http://xwiki.org/logo.png\" /></body></html>"

the output is 
beginDocument()
endDocument()

There is nothing about <img> event.

Original issue reported on code.google.com by [email protected] on 15 Aug 2008 at 3:39

Inline nowiki is not working correctly

What steps will reproduce the problem?
To test inline nowiki, I feed the parser the following lines

The following line will test inline nowiki
before the nowiki {{{ during the nowiki }}} after the nowiki
done

What is the expected output? What do you see instead?
When this gets rendered to HTML by the PrintListener, it looks like:

<div class='doc'>
<p>The following line will test inline nowiki
before the nowiki <code>{{{ during the nowiki }}}</code> after the nowiki
done </p>

The nowiki markup strings of "{{{" and "}}}" should not show up in the
rendered HTML.  The output should look like:

<div class='doc'>
<p>The following line will test inline nowiki
before the nowiki <code> during the nowiki </code> after the nowiki
done </p>

What version of the product are you using? On what operating system?
wikimodel-0.1.jar on Windows XP.


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Jan 2008 at 2:33

Bold issue for XWiki syntax

If you enter this input:

This is ***** bold

You get this output:

beginDocument
beginParagraph
onWord: [This]
onSpace
onWord: [is]
onSpace
onSpecialSymbol: [*]
onSpace
onWord: [bold]
endParagraph
endDocument

This doesn't look correct since reserializing this in wiki format will
generate: "This is * bold"

I would have expected either:
- an empty beginBold/endBold block followed by a special symbol (*)
- 3 special symbols (*) followed by a bold block

Thanks

Original issue reported on code.google.com by [email protected] on 16 Aug 2008 at 8:38

onEmptyLines generated with wrong count number for macros

For this input I get onEmptyLines(1):

-------------
this is one
paragraph

this is another one
-------------

However for this one I get only onEmptyLines(2):

-------------
{{macro/}}



{{macro/}}
-------------

Some more examples:

-------------
{{macro/}}



This is a para
-------------

generates onEmptyLines(3)

And

-------------
This is a para



{{macro/}}
-------------

generates onEmptyLines(2)

Original issue reported on code.google.com by [email protected] on 29 Aug 2008 at 6:41

XHTML Parser problems parsing lists

Hi,

I have several problems with the XHMTL parser and lists. Take the following
input:

<html><ol><li>Item 1<ol><li>Item 2<ul class="star"><li>Item
3</li></ul></li><li>Item 4</li></ol></li><li>Item 5</li></ol><ul
class="star"><li>Item 1<ul class="star"><li>Item 2<ul class="star"><li>Item
3</li></ul></li><li>Item 4</li></ul></li><li>Item 5</li><li>Item
6</li></ul></html>

It generates the following events:

beginList: [BULLETED]
beginListItem
onSpace
onWord: [ ]
onWord: [1]
beginList: [BULLETED]
beginListItem
onSpace
onWord: [ ]
onWord: [2]
beginList: [BULLETED]
beginListItem
onSpace
onWord: [ ]
onWord: [3]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onSpace
onWord: [ ]
onWord: [4]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onSpace
onWord: [ ]
onWord: [5]
endListItem
endList: [BULLETED]
beginList: [BULLETED]
beginListItem
onSpace
onWord: [ ]
onWord: [1]
beginList: [BULLETED]
beginListItem
onSpace
onWord: [ ]
onWord: [2]
beginList: [BULLETED]
beginListItem
onSpace
onWord: [ ]
onWord: [3]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onSpace
onWord: [ ]
onWord: [4]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onSpace
onWord: [ ]
onWord: [5]
endListItem
beginListItem
onSpace
onWord: [ ]
onWord: [6]
endListItem
endList: [BULLETED]

However this is not correct. It should be:

beginList: [NUMBERED]
beginListItem
onWord: [Item]
onSpace
onWord: [1]
beginList: [NUMBERED]
beginListItem
onWord: [Item]
onSpace
onWord: [2]
beginList: [BULLETED]
beginListItem
onWord: [Item]
onSpace
onWord: [3]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onWord: [Item]
onSpace
onWord: [4]
endListItem
endList: [NUMBERED]
endListItem
beginListItem
onWord: [Item]
onSpace
onWord: [5]
endListItem
endList: [NUMBERED]
beginList: [BULLETED]
beginListItem
onWord: [Item]
onSpace
onWord: [1]
beginList: [BULLETED]
beginListItem
onWord: [Item]
onSpace
onWord: [2]
beginList: [BULLETED]
beginListItem
onWord: [Item]
onSpace
onWord: [3]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onWord: [Item]
onSpace
onWord: [4]
endListItem
endList: [BULLETED]
endListItem
beginListItem
onWord: [Item]
onSpace
onWord: [5]
endListItem
beginListItem
onWord: [Item]
onSpace
onWord: [6]
endListItem
endList: [BULLETED]

There are 2 problems:
* the "Item" word is swallowed
* it doesn't support ordered lists

Thanks


Original issue reported on code.google.com by [email protected] on 20 Jun 2008 at 11:55

Syntax problem in XWiki parser for handling tables

Currently there's a problem since the xwiki parser in wikimodel recognizes
{table} but since we've now doubled the curly braces for macro syntax the
new {{table}} macro isn't recognized.

On a related topic we're rewriting the table macro so there'll probably be
some differences from what exists now. I'll update this issue when we've
progressed more.

Original issue reported on code.google.com by [email protected] on 21 Aug 2008 at 11:42

Make XHTML parser recognize escaped text

For example XWiki generates the following XHTML for escapes:

<html><p><pre><![CDATA[*]]></pre><pre><![CDATA[*]]></pre>hello<pre><![CDATA[*]]>
</pre><pre><![CDATA[*]]></pre></p></html>

This should generate the following events:

beginDocument
beginParagraph
onEscape: [*]
onEscape: [*]
onWord: [hello]
onEscape: [*]
onEscape: [*]
endParagraph
endDocument

We can discuss the XHTML syntax we want to use.

Thanks

Original issue reported on code.google.com by [email protected] on 27 Aug 2008 at 7:15

XHTML parsers fails to parse some HREF

Input:

<html><p><a class="wikicreatelink"
href="/xwiki/bin/view/Space/UnknownPage"><span
class="wikicreatelinktext">label</span><span
class="wikicreatelinkqm">?</span></a></p></html>

Output:

beginDocument
beginParagraph
onWord: [label]
onSpecialSymbol: [?]
endParagraph
endDocument

As you see it's missing the onReference event.

Original issue reported on code.google.com by [email protected] on 21 Aug 2008 at 8:33

Add support for styles

For example the XHTMLParser should understand:

<span style="font-weight: bold;">foo</span>

See
http://groups.google.com/group/wikimodel-users/browse_thread/thread/57dfa59ee40d
6e65

Original issue reported on code.google.com by [email protected] on 26 Aug 2008 at 10:27

XWiki syntax - {code} tag contents wrongly parsed

Steps to reproduce the problem: parse the following syntax with the XWiki
parser: "before{code}\n1 Not a header\n\n* Not a list{code}after text text
text{code} again{code}"

Only one big "{code}" section will be identified, instead of two as expcted.



Original issue reported on code.google.com by [email protected] on 28 Aug 2007 at 11:00

Add support for underline as a format element and fix XWiki's scanner for "__"

Wikimodel should support underline. It's pretty common in wikis, see
http://www.wikimatrix.org/syntax.php?i=25

In addition right now in XWikiScanner.jj there's:

            t = getFORMAT_SYMBOL()
            {
                str = t.image.trim();
                WikiStyle style = null;
                if ("__".equals(str) || "**".equals(str)) {
                    style  = IWikiScannerContext.STRONG;

This is not correct since "__" is used for underline in XWiki and not for Bold.

Thanks a lot
-Vincent

Original issue reported on code.google.com by [email protected] on 14 Aug 2008 at 4:13

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.