Skip to content

Commit a61be5a

Browse files
committed
Fix and improve readme and extension comments
1 parent 4115ab3 commit a61be5a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Currently _pegdown_ supports the following extensions over standard Markdown:
1212
* QUOTES: Beautifies single quotes, double quotes and double angle quotes (« and »)
1313
* SMARTYPANTS: Convenience extension enabling both, SMARTS and QUOTES, at once.
1414
* ABBREVIATIONS: Abbreviations in the way of [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/#abbr).
15-
* ANCHORLINKS: generate anchor links for headers by taking the first range of alphanumerics and spaces.
15+
* ANCHORLINKS: Generate anchor links for headers by taking the first range of alphanumerics and spaces.
1616
* HARDWRAPS: Alternative handling of newlines, see [Github-flavoured-Markdown]
1717
* AUTOLINKS: Plain (undelimited) autolinks the way [Github-flavoured-Markdown] implements them.
1818
* 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:
2929
* [ ] open task item
3030
* [x] closed or completed task item.
3131
* [X] also closed or completed task item.
32-
* EXTANCHORLINKS uses all text of the header for ANCHORLINKS, spaces and non-alphanumerics replaced by `-`, multiple dashes trimmed to one.
32+
* EXTANCHORLINKS: Generate anchor links for headers using complete contents of the header.
33+
* Spaces and non-alphanumerics replaced by `-`, multiple dashes trimmed to one.
34+
* Anchor link is added as first element inside the header with empty content: `<h1><a name="header"></a>header</h1>`
3335

3436
Note: _pegdown_ differs from the original Markdown in that it ignores in-word emphasis as in
3537

src/main/java/org/pegdown/Extensions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public interface Extensions {
137137
static final int FORCELISTITEMPARA = 0x00080000;
138138

139139
/**
140-
* Force List and Definition Paragraph wrapping if it includes more than just a single paragraph
140+
* Allow horizontal rules without a blank line following them.
141141
*/
142142
static final int RELAXEDHRULES = 0x00100000;
143143

@@ -147,7 +147,9 @@ public interface Extensions {
147147
static final int TASKLISTITEMS = 0x00200000;
148148

149149
/**
150-
* GitHub style task list items: - [ ] and - [x]
150+
* Generate anchor links for headers using complete contents of the header.
151+
* Spaces and non-alphanumerics replaced by `-`, multiple dashes trimmed to one.
152+
* Anchor link is added as first element inside the header with empty content: `<h1><a name="header-a"></a>header a</h1>`
151153
*/
152154
static final int EXTANCHORLINKS = 0x00400000;
153155

0 commit comments

Comments
 (0)