From a61be5a0f276e1e8419dacc3b92f8e04fdc71566 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Sun, 20 Sep 2015 01:43:35 +0300 Subject: [PATCH] Fix and improve readme and extension comments --- README.markdown | 6 ++++-- src/main/java/org/pegdown/Extensions.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index a61efc9..393ba6c 100644 --- a/README.markdown +++ b/README.markdown @@ -12,7 +12,7 @@ Currently _pegdown_ supports the following extensions over standard Markdown: * 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](http://michelf.com/projects/php-markdown/extra/#abbr). -* ANCHORLINKS: generate anchor links for headers by taking the first range of alphanumerics and spaces. +* ANCHORLINKS: Generate anchor links for headers by taking the first range of alphanumerics and spaces. * 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](http://fletcherpenney.net/multimarkdown/) (which is in turn like the [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/#table) tables, but with colspan support). @@ -29,7 +29,9 @@ Currently _pegdown_ supports the following extensions over standard Markdown: * [ ] open task item * [x] closed or completed task item. * [X] also closed or completed task item. -* EXTANCHORLINKS uses all text of the header for ANCHORLINKS, spaces and non-alphanumerics replaced by `-`, multiple dashes trimmed to one. +* EXTANCHORLINKS: Generate anchor links for headers using complete contents of the header. + * Spaces and non-alphanumerics replaced by `-`, multiple dashes trimmed to one. + * Anchor link is added as first element inside the header with empty content: `

header

` Note: _pegdown_ differs from the original Markdown in that it ignores in-word emphasis as in diff --git a/src/main/java/org/pegdown/Extensions.java b/src/main/java/org/pegdown/Extensions.java index 7a98606..7644da3 100644 --- a/src/main/java/org/pegdown/Extensions.java +++ b/src/main/java/org/pegdown/Extensions.java @@ -137,7 +137,7 @@ public interface Extensions { static final int FORCELISTITEMPARA = 0x00080000; /** - * Force List and Definition Paragraph wrapping if it includes more than just a single paragraph + * Allow horizontal rules without a blank line following them. */ static final int RELAXEDHRULES = 0x00100000; @@ -147,7 +147,9 @@ public interface Extensions { static final int TASKLISTITEMS = 0x00200000; /** - * GitHub style task list items: - [ ] and - [x] + * Generate anchor links for headers using complete contents of the header. + * Spaces and non-alphanumerics replaced by `-`, multiple dashes trimmed to one. + * Anchor link is added as first element inside the header with empty content: `

header a

` */ static final int EXTANCHORLINKS = 0x00400000;