jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven Doxia
  • Maven Doxia
  • DOXIA-426

Markdown module

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.3
  • Fix Version/s: 1.3
  • Component/s: Module - Markdown, Modules
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    4

Description

Markdown is a widespread Markup language. It would be nice if there was a Doxia module for Markdown.

Here is a proposed simple implementation that defers all the parsing and rendering to PegDown (Apache License V2), which is the most reliable Java library for Markdown.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    doxia-module-markdown.patch
    15/May/11 4:42 AM
    18 kB
    Julien Nicoulaud
  2. Text File
    doxia-module-markdown-2.patch
    21/May/11 2:16 PM
    16 kB
    Julien Nicoulaud
  3. Text File
    doxia-module-markdown-3.patch
    28/May/11 8:02 AM
    108 kB
    Julien Nicoulaud
  4. Text File
    doxia-module-markdown-4.patch
    06/Jul/11 7:11 AM
    0.5 kB
    Julien Nicoulaud

Issue Links

is related to

Task - A task that needs to be done. DOXIA-436 Remove xhtml-module dependency of markdown module

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Lukas Theussl added a comment - 17/May/11 2:02 AM

Thanks! I have added the module to the sandbox for the moment.

Some questions/comments:

  • since MarkdownSink is not implemented it would be better to remove the class altogether, or do you plan to provide an implementation?
  • the MarkdownParser emits the parsing result as rawText, this means the parser is only usable for html output (see related DOXIA-183). This should be re-written to emit proper doxia events (e.g. by chaining a XhtmlParser).
  • I'd prefer some more realistic test cases before promoting this out of the sandbox
Show
Lukas Theussl added a comment - 17/May/11 2:02 AM Thanks! I have added the module to the sandbox for the moment. Some questions/comments: since MarkdownSink is not implemented it would be better to remove the class altogether, or do you plan to provide an implementation? the MarkdownParser emits the parsing result as rawText, this means the parser is only usable for html output (see related DOXIA-183 ). This should be re-written to emit proper doxia events (e.g. by chaining a XhtmlParser). I'd prefer some more realistic test cases before promoting this out of the sandbox
Hide
Permalink
Julien Nicoulaud added a comment - 21/May/11 2:16 PM

Thanks for reviewing the patch !

Here is a new one (or am I supposed to commit in the sandbox ?):

  • Removed MarkdownSink
  • MarkdownParser now extends XhtmlParser (which means doxia-module-markdown depends on doxia-module-xhtml and should be the last module in doxia-modules)
  • Added some test cases to make sure doxia events are fired. Not all events types are tested, tell me if you want more.
  • Upgraded PegDown library to last release
Show
Julien Nicoulaud added a comment - 21/May/11 2:16 PM Thanks for reviewing the patch ! Here is a new one (or am I supposed to commit in the sandbox ?): Removed MarkdownSink MarkdownParser now extends XhtmlParser (which means doxia-module-markdown depends on doxia-module-xhtml and should be the last module in doxia-modules) Added some test cases to make sure doxia events are fired. Not all events types are tested, tell me if you want more. Upgraded PegDown library to last release
Hide
Permalink
Lukas Theussl added a comment - 22/May/11 9:20 AM

Are you an apache committer? In that case you should have commit rights in the sandbox (I think). Tell me, otherwise I'll review the patch.

Show
Lukas Theussl added a comment - 22/May/11 9:20 AM Are you an apache committer? In that case you should have commit rights in the sandbox (I think). Tell me, otherwise I'll review the patch.
Hide
Permalink
Julien Nicoulaud added a comment - 22/May/11 9:24 AM

No, I'm not.

Show
Julien Nicoulaud added a comment - 22/May/11 9:24 AM No, I'm not.
Hide
Permalink
Lukas Theussl added a comment - 27/May/11 2:30 AM

Patch applied in r1128181, thanks! Some remarks:

  • I was stuck first with some weird plexus error until I realized that you had removed the text from MarkdownSink but not deleted the file
  • I also removed MarkdownParseException, as it only delegated to ParseException
  • please don't change the formatting, import order etc.

Two more requests:

  • the test resource file test.md should contain a complete document with all supported markup, a la test.apt (it doesn't actually have to be tested, just to check that the parser doesn't choke on anything).
  • It would be nice to have a rudimentary site with intro and links to some external resources.

Can you supply that? Otherwise looks good IMO.

Show
Lukas Theussl added a comment - 27/May/11 2:30 AM Patch applied in r1128181 , thanks! Some remarks: I was stuck first with some weird plexus error until I realized that you had removed the text from MarkdownSink but not deleted the file I also removed MarkdownParseException, as it only delegated to ParseException please don't change the formatting, import order etc. Two more requests: the test resource file test.md should contain a complete document with all supported markup, a la test.apt (it doesn't actually have to be tested, just to check that the parser doesn't choke on anything). It would be nice to have a rudimentary site with intro and links to some external resources. Can you supply that? Otherwise looks good IMO.
Hide
Permalink
Julien Nicoulaud added a comment - 28/May/11 8:07 AM

Sorry for the empty files, this is due to the way IntelliJ IDEA exports Subversion patches.

Here is a new one:

  • test.md is now exhaustive.
  • Added a unit test I had forgotten.
  • Added rudimentary site index page.
Show
Julien Nicoulaud added a comment - 28/May/11 8:07 AM Sorry for the empty files, this is due to the way IntelliJ IDEA exports Subversion patches. Here is a new one: test.md is now exhaustive. Added a unit test I had forgotten. Added rudimentary site index page.
Hide
Permalink
Lukas Theussl added a comment - 29/May/11 12:51 AM

Patch applied in r1128829. Thanks!

Show
Lukas Theussl added a comment - 29/May/11 12:51 AM Patch applied in r1128829 . Thanks!
Hide
Permalink
Lukas Theussl added a comment - 30/May/11 3:26 AM

Moved out of the sandbox: r1129048. Thanks again!

Show
Lukas Theussl added a comment - 30/May/11 3:26 AM Moved out of the sandbox: r1129048 . Thanks again!
Hide
Permalink
Julien Nicoulaud added a comment - 30/May/11 3:48 AM

Great ! Thanks for the guidelines.

Show
Julien Nicoulaud added a comment - 30/May/11 3:48 AM Great ! Thanks for the guidelines.
Hide
Permalink
Lukas Theussl added a comment - 31/May/11 12:54 AM

Re-opening because of test failures: https://builds.apache.org/view/M-R/view/Maven/job/doxia/

Apparently the pegdown dependency requires java 6, we are still stuck on java 5.

Show
Lukas Theussl added a comment - 31/May/11 12:54 AM Re-opening because of test failures: https://builds.apache.org/view/M-R/view/Maven/job/doxia/ Apparently the pegdown dependency requires java 6, we are still stuck on java 5.
Hide
Permalink
Julien Nicoulaud added a comment - 06/Jul/11 7:11 AM

This should have been fixed by pegdown 1.0.2 that just hit Central.

Show
Julien Nicoulaud added a comment - 06/Jul/11 7:11 AM This should have been fixed by pegdown 1.0.2 that just hit Central.
Hide
Permalink
Lukas Theussl added a comment - 08/Jul/11 1:13 AM

Committed again with upgraded pegdown dep: http://svn.apache.org/viewvc?rev=1143770&view=rev

Jenkins is happy too: https://builds.apache.org/job/doxia/52/

Just for the record: the dependency on xhtml-module should be removed if possible, delegating the work to another parser is not good practice. I opened DOXIA-436 for this.

Show
Lukas Theussl added a comment - 08/Jul/11 1:13 AM Committed again with upgraded pegdown dep: http://svn.apache.org/viewvc?rev=1143770&view=rev Jenkins is happy too: https://builds.apache.org/job/doxia/52/ Just for the record: the dependency on xhtml-module should be removed if possible, delegating the work to another parser is not good practice. I opened DOXIA-436 for this.
Hide
Permalink
Lukas Theussl added a comment - 08/Jul/11 1:17 AM

Closing with remarks above. Thanks!

Show
Lukas Theussl added a comment - 08/Jul/11 1:17 AM Closing with remarks above. Thanks!

People

  • Assignee:
    Lukas Theussl
    Reporter:
    Julien Nicoulaud
Vote (0)
Watch (1)

Dates

  • Created:
    15/May/11 4:42 AM
    Updated:
    08/Jul/11 1:17 AM
    Resolved:
    08/Jul/11 1:17 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.