postmodern / kramdown-man Goto Github PK
View Code? Open in Web Editor NEWAllows you to write man pages in pure markdown.
License: MIT License
Allows you to write man pages in pure markdown.
License: MIT License
Instead of trying to identify paragraphs that start with a code
, em
, or strong
element and who's first line isn't indented but the following lines are indented, kramdown-man
should just use normal markdown definition lists. This will entail adding convert_dt
and convert_dd
methods, which outputs a .TP
modifier, followed by the term and the definition body.
`-o`, `--option`, *VALUE*
Description of the option goes here.
...
`-o`, `--option` **VALUE**
: Description of the option goes here.
...
.TP
\fB-o\fR, \fB--option\fR \fBALUE\fP
Description of the option goes here.
Add a Kramdown::Man::CLI
class and move CLI logic out of bin/kramdown-man
.
Should be able to achieve 70-80% documentation coverage.
We don't use Kramdown on our sites, we prefer Redcarpet & Github-Markdown through html-pipeline.
If you need help tell me where I can start and I'll be happy to help.
Support converting typographic_sym
elements. Kramdown will automatically parse certain sequences of characters into HTML entities.
doc = Kramdown::Document.new("-- Mr. Smith")
doc.root.children[0].children
# => [<kd:typographic_sym :ndash nil>, <kd:text " Mr. Smith" nil>]
According to the documentation definition lists (and tables) are not supported even if kramdown does support it.
Let's run with that rake task, since it never got merged into md2man.
Add more example syntax to man/kramdown-man.1.md
and the README.
Bold text at the beginning of a text block creates a hanging left indentation (.HP
) in roff output:
**shards** requires the presence of a `shard.yml` file in the project
folder (working directory). This file describes the project and lists
dependencies that are required to build it.
.HP
\fBshards\fP requires the presence of a \fBshard.yml\fR file in the project
folder (working directory)\. This file describes the project and lists
dependencies that are required to build it\.
That seems unexpected to me. And .HP
is deprecated.
Support detecting multiple options in tagged paragraphs:
`-f`, `--foo`
The foo option
Which parses as:
[<kd:p nil [<kd:codespan "-f" nil>, <kd:text ", " nil>, <kd:codespan "--foo" nil>, <kd:text "\n\tThe foo option" nil>]>]
It would be nice to disable the generated by. For sure we will love to give credit to your project on our site but having it on every manpage generated for our docs can just get in the way. I understand the the anger that might be caused by that logic but if we all had to comply with that we would all have Generated by "Insert guy who originally created the first modern processor as we know it".
Indented paragraphs end up retaining their indentation, but the paragraph is word wrapped by man.
More precisely, it would be great if triple backtick code blocks were to be parsed correctly.
I don't know ruby, but i suspect, it would be relatively easy to add using GFM Parser.
A man link containing a dot seems to be broken:
See [shard.yml](man:shard.yml(5)) for more information.
See
.BR shard for more
information\.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.