Skip to content

Commit

Permalink
Merge pull request #25 from neocotic/wip-2.1.1
Browse files Browse the repository at this point in the history
2.1.1 WIP
  • Loading branch information
neocotic committed May 6, 2013
2 parents 26c95f0 + 3093f54 commit 21f9c31
Show file tree
Hide file tree
Showing 22 changed files with 309 additions and 213 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
npm-debug.log
tmp/

.DS_Store?
ehthumbs.db
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2013.05.06, Version 2.1.1

* [#24](https://github.com/neocotic/html.md/issues/24): Add `base` option to specify the base URL used to resolve relative URLs

2013.05.03, Version 2.1.0

* [#18](https://github.com/neocotic/html.md/issues/18): Add support for [bower][] installations
Expand Down
7 changes: 4 additions & 3 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = (grunt) ->

# Configure
# ---------
# Configuration
# -------------

grunt.initConfig

Expand All @@ -11,6 +11,7 @@ module.exports = (grunt) ->
docs: ['docs/*']
lib: ['lib/*']
dist: ['dist/*']
test: ['tmp']

coffee:
all:
Expand Down Expand Up @@ -46,4 +47,4 @@ module.exports = (grunt) ->

grunt.registerTask 'build', ['clean', 'coffee', 'docco', 'uglify']
grunt.registerTask 'default', ['build', 'test']
grunt.registerTask 'test', ['nodeunit']
grunt.registerTask 'test', ['clean:test', 'nodeunit']
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ $ md -l .

-h, --help output usage information
-V, --version output the version number
-a, --absolute always use absolute URLs for links
-a, --absolute always use absolute URLs for links and images
-b, --base <url> set base URL to resolve relative URLs from
-d, --debug print additional debug information
-e, --eval pass a string from the command line as input
-i, --inline generate inline style links
Expand Down Expand Up @@ -122,7 +123,11 @@ The following options are recognised by this method (all of which are optional);
</tr>
<tr>
<td>absolute</td>
<td>All links are parsed with absolute URLs</td>
<td>All links and images are parsed with absolute URLs</td>
</tr>
<tr>
<td>base</td>
<td>All relative links and images are resolved from this URL</td>g
</tr>
<tr>
<td>debug</td>
Expand All @@ -134,6 +139,8 @@ The following options are recognised by this method (all of which are optional);
</tr>
</table>

**Note:** The `base` option *only* works in the [node.js][] environment.

### Miscellaneous

#### `noConflict()`
Expand All @@ -157,7 +164,7 @@ This is really just intended for use within a browser.
The current version of `md`.

``` javascript
console.log(md.version); // "2.1.0"
console.log(md.version); // "2.1.1"
```

## Windows
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "html-md",
"version": "2.1.0",
"version": "2.1.1",
"main": "dist/md.min.js"
}
4 changes: 2 additions & 2 deletions dist/md.min.js

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions docs/command.html

Large diffs are not rendered by default.

159 changes: 79 additions & 80 deletions docs/md.html

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions lib/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 33 additions & 44 deletions lib/md.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion man/md.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
.I output_dir
]
[
.B \-b
.I base_url
]
[
.I paths
]
.br
Expand All @@ -40,7 +44,15 @@ systems to provide a complete command line utility.

.TP 15
.B \-a/\-\-absolute
Always use absolute URLs for converted links.
Always use absolute URLs for converted links and
images.

.HP
.B \-b/\-\-base
.I url
.br
Specifies the base URL to resolve relative URLs
from.

.TP
.B \-d/\-\-debug
Expand Down
Loading

0 comments on commit 21f9c31

Please sign in to comment.