Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prepare for 1.1.0 release

  • Loading branch information...
commit 0e45a7b61e00884d98340f24f8bd1bdf799bcb22 1 parent a9b8fc3
@sirthias authored
Showing with 51 additions and 36 deletions.
  1. +13 −0 CHANGELOG
  2. +34 −31 README.markdown
  3. +3 −4 buildfile
  4. +1 −1  pom.xml
View
13 CHANGELOG
@@ -1,3 +1,14 @@
+Version 1.1.0 (2011-10-05)
+--------------------------
+- Upgraded to parboiled 1.0.2
+- Introduced LinkRenderer layer for easy customization of HTML link rendering
+- Added support for [[Wiki-style]] links, thx to Brett Porter
+- Fixed #27 (Missing emphasis when paragraph has multiple lines)
+- Fixed #28 (Parser not fully extensible)
+- Fixed #32, #33 (HTML tags with attribute names containing underscores are not recognized as tags, thx to Edward Samson)
+- Fixed #34 (Pathologically slow parsing when strong and italics emphasis are applied together)
+
+
Version 1.0.2 (2011-07-05)
--------------------------
- Simplify custom extensions by making `private` fields/methods of ToHtmlSerializer and Parser `protected`
@@ -7,10 +18,12 @@ Version 1.0.2 (2011-07-05)
- Fixed broken Java 1.5 compatibility (thx to Julien Nicoulaud)
- Fixed maven build: add testng and jtidy deps for tests, and configure the compiler plugin for java 5 (thx to Lukas Theussl)
+
Version 1.0.1 (2011-05-17)
--------------------------
- Fixed #18 (code blocks in list items split by lines)
+
Version 1.0.0 (2011-05-13)
--------------------------
- Closed #3 (PhpMarkdownExtra-style definition lists)
View
65 README.markdown
@@ -1,8 +1,8 @@
Introduction
------------
-_pegdown_ is a pure Java library for clean and lightweight [Markdown][] processing.
-It's implementation is based on a [parboiled][] PEG parser and is therefore rather easy to understand and extend.
+_pegdown_ is a pure Java library for clean and lightweight [Markdown] processing.
+It's implementation is based on a [parboiled] PEG parser and is therefore rather easy to understand and extend.
_pegdown_ is nearly 100% compatible with the original Markdown specification and fully passes the original Markdown test suite.
On top of the standard Markdown feature set _pegdown_ implements a number of extensions similar to what other popular Markdown processors offer.
@@ -11,16 +11,15 @@ Currently _pegdown_ supports the following extensions over standard Markdown:
* SMARTS: Beautifies apostrophes, ellipses ("..." and ". . .") and dashes ("--" and "---")
* QUOTES: Beautifies single quotes, double quotes and double angle quotes (« and »)
* SMARTYPANTS: Convenience extension enabling both, SMARTS and QUOTES, at once.
-* ABBREVIATIONS: Abbreviations in the way of [PHP Markdown Extra][].
-* HARDWRAPS: Alternative handling of newlines, see [Github-flavoured-Markdown][]
-* AUTOLINKS: Plain (undelimited) autolinks the way [Github-flavoured-Markdown][] implements them.
-* TABLES: Tables similar to [MultiMarkdown][] (which is in turn like the [PHP Markdown Extra][] tables, but with colspan support).
-* DEFINITION LISTS: Definition lists in the way of [PHP Markdown Extra][].
-* FENCED CODE BLOCKS: Fenced Code Blocks in the way of [PHP Markdown Extra][] or [Github-flavoured-Markdown][].
+* ABBREVIATIONS: Abbreviations in the way of [PHP Markdown Extra].
+* HARDWRAPS: Alternative handling of newlines, see [Github-flavoured-Markdown]
+* AUTOLINKS: Plain (undelimited) autolinks the way [Github-flavoured-Markdown] implements them.
+* TABLES: Tables similar to [MultiMarkdown] (which is in turn like the [PHP Markdown Extra] tables, but with colspan support).
+* DEFINITION LISTS: Definition lists in the way of [PHP Markdown Extra].
+* FENCED CODE BLOCKS: Fenced Code Blocks in the way of [PHP Markdown Extra] or [Github-flavoured-Markdown].
* HTML BLOCK SUPPRESSION: Suppresses the output of HTML blocks.
* INLINE HTML SUPPRESSION: Suppresses the output of inline HTML elements.
-* NO_FOLLOW_LINKS: Attaches a `rel="nofollow"` attribute to all generated HTML links.
-* WIKILINKS: Support [[Wiki-style links]] with a customizable URL rendering logic.
+* WIKILINKS: Support `[[Wiki-style links]]` with a customizable URL rendering logic.
Note: _pegdown_ differs from the original Markdown in that it ignores in-word emphasis as in
@@ -35,8 +34,8 @@ Installation
You have two options:
-* Download the JAR for the latest version from the [download page][].
- _pegdown_ 1.0.2 has only one dependency: [parboiled for Java][parboiled], version 1.0.1.
+* Download the JAR for the latest version from the [download page].
+ _pegdown_ 1.1.0 has only one dependency: [parboiled for Java][parboiled], version 1.0.2.
* Point your Maven-compatible build tool to the repository at <http://scala-tools.org/repo-releases>,
group id "**org.pegdown**", artifact "**pegdown**".
@@ -46,19 +45,22 @@ You have two options:
Usage
-----
-Using _pegdown_ is very simple: Just create a new instance of a [PegDownProcessor][] and call one of its
-_markdownToHtml_ methods to convert the given Markdown source to an HTML string.
+Using _pegdown_ is very simple: Just create a new instance of a [PegDownProcessor] and call one of its
+`markdownToHtml` methods to convert the given Markdown source to an HTML string. If you'd like to customize the
+rendering of HTML links (Auto-Links, Explicit-Links, Mail-Links, Reference-Links and/or Wiki-Links), e.g. for adding
+`rel="nofollow"` attributes based on some logic you can supply your own instance of a [LinkRenderer] with the call
+to `markdownToHtml`.
You can also use pegdown only for the actual parsing of the Markdown source and do the serialization to the
-target format (e.g. XML) yourself. To do this just call the _parseMarkdown_ method of the [PegDownProcessor][] to obtain
+target format (e.g. XML) yourself. To do this just call the `parseMarkdown` method of the [PegDownProcessor] to obtain
the root node of the Astract Syntax Tree for the document.
-With a custom [Visitor][] implementation you can do whatever serialization you want. As an example you might want to
-take a look at the [sources of the ToHtmlSerializer](https://github.com/sirthias/pegdown/blob/develop/src/main/java/org/pegdown/ToHtmlSerializer.java).
+With a custom [Visitor] implementation you can do whatever serialization you want. As an example you might want to
+take a look at the [sources of the ToHtmlSerializer][ToHtmlSerializer].
-Note that the first time you create a [PegDownProcessor][] it can take up to a few hundred milliseconds to prepare the
+Note that the first time you create a [PegDownProcessor] it can take up to a few hundred milliseconds to prepare the
underlying parboiled parser instance. However, once the first processor has been built all further instantiations will
-be fast. Also, you can reuse an existing [PegDownProcessor][] instance as often as you want, as long as you prevent
-concurrent accesses, since neither the [PegDownProcessor][] nor the underlying parser is thread-safe.
+be fast. Also, you can reuse an existing [PegDownProcessor] instance as often as you want, as long as you prevent
+concurrent accesses, since neither the [PegDownProcessor] nor the underlying parser is thread-safe.
See <http://sirthias.github.com/pegdown/api> for the pegdown API documation.
@@ -66,24 +68,20 @@ See <http://sirthias.github.com/pegdown/api> for the pegdown API documation.
IDE Support
-----------
-The excellent [idea-markdown plugin](https://github.com/nicoulaj/idea-markdown) for IntelliJ IDEA, RubyMine, PhpStorm,
-WebStorm, PyCharm and appCode uses _pegdown_ as its underlying parsing engine.
-The plugin gives you proper syntax-highlighting for markdown source and shows you exactly, how _pegdown_ will parse your
-texts.
+The excellent [idea-markdown plugin] for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm and appCode uses _pegdown_ as its underlying parsing engine. The plugin gives you proper syntax-highlighting for markdown source and shows you exactly, how _pegdown_ will parse your texts.
Hacking on pegdown
------------------
-pegdown uses [Apache Buildr](http://buildr.apache.org) for managing the build process. However, if you do not want to
+pegdown uses [Apache Buildr] for managing the build process. However, if you do not want to
install Buildr on your machine, it should be no problem to quickly set up a project structure for the IDE of your choice
around the sources, since they are quite compact and the dependencies are few.
In order to provide custom markdown extensions to pegdown you shouldn't even have to get your hands dirty with its
-sources. A [PegDownProcessor][] can be constructed around a given Parser instance, so you can supply your own.
+sources. A [PegDownProcessor] can be constructed around a given Parser instance, so you can supply your own.
If you want to go that way probably want to subclass the _org.pegdown.Parser_ class and override a limited
-number of rules to inject your own extensions. Your extensions can create custom [Node](http://www.decodified.com/pegdown/api/org/pegdown/ast/Node.html)
-implementations, which you can process through the general _visit(Node)_ method of a custom [Visitor][] implementation.
+number of rules to inject your own extensions. Your extensions can create custom [Node] implementations, which you can process through the general `visit(Node)` method of a custom [Visitor] implementation.
Credits
@@ -109,8 +107,13 @@ Along with any patches, please state that the patch is your original work and th
[Markdown]: http://daringfireball.net/projects/markdown/ "Main Markdown site"
[parboiled]: http://www.parboiled.org
[PHP Markdown Extra]: http://michelf.com/projects/php-markdown/extra/#html
- [Download Page]: http://github.com/sirthias/pegdown/downloads
- [PegDownProcessor]: http://sirthias.github.com/pegdown/api/org/pegdown/PegDownProcessor.html
[Github-flavoured-Markdown]: http://github.github.com/github-flavored-markdown/
[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/users_guide/multimarkdown_syntax_guide/
- [Visitor]: http://www.decodified.com/pegdown/api/org/pegdown/ast/Visitor.html
+ [Download Page]: http://github.com/sirthias/pegdown/downloads
+ [PegDownProcessor]: http://www.decodified.com/pegdown/api/org/pegdown/PegDownProcessor.html
+ [LinkRenderer]: http://www.decodified.com/pegdown/api/org/pegdown/LinkRenderer.html
+ [Visitor]: http://www.decodified.com/pegdown/api/org/pegdown/ast/Visitor.html
+ [ToHtmlSerializer]: https://github.com/sirthias/pegdown/blob/master/src/main/java/org/pegdown/ToHtmlSerializer.java
+ [idea-markdown plugin]: https://github.com/nicoulaj/idea-markdown
+ [Apache Buildr]: http://buildr.apache.org
+ [Node]: http://www.decodified.com/pegdown/api/org/pegdown/ast/Node.html
View
7 buildfile
@@ -2,13 +2,12 @@ repositories.remote << 'http://repo1.maven.org/maven2'
repositories.remote << 'http://scala-tools.org/repo-releases'
#repositories.remote << 'http://scala-tools.org/repo-snapshots'
-#upload_to = 'scala_tools_releases'
-upload_to = 'scala_tools_snapshots'
-#upload_to = 'silo'
+upload_to = 'scala_tools_releases'
+#upload_to = 'scala_tools_snapshots'
url, user, pass = Buildr.settings.user[upload_to].values_at('url', 'user', 'pass')
repositories.release_to = { :url => url, :username => user, :password => pass }
-VERSION_NUMBER = '1.1.0-SNAPSHOT'
+VERSION_NUMBER = '1.1.0'
desc 'The pegdown project'
define 'pegdown' do
View
2  pom.xml
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.pegdown</groupId>
<artifactId>pegdown</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.0</version>
<inceptionYear>2010</inceptionYear>
<licenses>
<license>
Please sign in to comment.
Something went wrong with that request. Please try again.