Giter Club home page Giter Club logo

md2review's Introduction

md2review

Gem Version Build Status

md2review is a CLI tool to convert from Markdown into Re:VIEW (http://reviewml.org/ ). This command uses Redcarpet gem to parse markdown.

Usage

You can use the commmand md2review as:

$ md2review [options] your-document.md > your-document.re

Options

  • --version: show version
  • --help: show help
  • --render-header-offset = N: use offset of header levels
  • --render-disable-image-caption: disable image caption; coverting into //indepimage
  • --render-link-in-footnote: enable links in footnote.
  • --render-enable-cmd: support //cmd{...//} for shell-session and console blocks
  • --render-math: support @<m>{...} and //texequation{...}
  • --render-table-caption: support table caption before table like Table: some captions
  • --parse-no-intra-emphasis: do not parse emphasis inside of words.
  • --parse-autolink: parse links even when they are not enclosed in <> characters.
  • --render-empty-image-caption: use //image with caption and use //indepimage without caption

Installation

Add this line to your application's Gemfile:

gem 'md2review'

And then execute:

$ bundle

Or install it yourself as:

$ gem install md2review

History

v1.12.1

  • fix: typo (@yukirii)

v1.12.0

  • fix: anchor content should be escaped

v1.11.0

  • add: option --empty-image-caption: switch to use //image or //indepimage with caption

v1.10.0

  • add: option --image-table to support //imgtable with ![Table:foo](...)
  • fix: olist before/after ulist

v1.9.0

  • fix: fix math support for complex cases

v1.8.0

  • add: option --version
  • add: option --render-math to support @<m>{...} and //texequation{\n...\n}\n
  • add: option --render-table-caption to support Table: caption

v1.7.0

  • fix: when href in emphasis (@hanachin)
  • fix: spaces before image block (@hanachin)
  • fix: remove inline markup in href content (@hanachin)

v1.6.0

  • special attribute in header need a separator(U+0020) to distinguish from Re:VIEW inline markup (reported by @himajin315 and @yasulab)

v1.5.0

  • support language on code block
  • add option --render-enable-cmd

v1.4.0

  • fix handling empty cell in //table
  • support header attributes in PHP Markdown Extra

v1.3.0

  • allow images in list items (with @<icon>)
  • add option --disable-image-caption
  • allow 6th header level
  • add option --render-link-in-footnote (by @masarakki)
  • support inline markup in footnote (by @hamano)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

md2review's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

md2review's Issues

ボールドの誤変換?

PRじゃなくてスミマセン。使用中に予期せぬ変換がありましたのでお伝えします。確かにMarkdownの文法的には誤りではなさそうなのですが、これはどうやって回避するのがいいんですかね…...。

元:openstack_user_config.yml
結果:openstack@{user}config.yml
期待する変換:openstack_user_config.yml

render-header-offsetでマイナス値を指定したい

現在のbin/md2reviewコードではoffset値は0、1、2しか取れず、「#の多いレベルを少ないレベルに変換」(項を節に格上げするなど)する方向しかできないようになっています。

if arg =~ /^--render-header-offset\s*=\s*([012])$/

実際に受け取る原稿では逆に、「節分割したmdで、節題が#から始まり、章題はREADME.mdの目次のほうを見よ」という書き方をしているケースが非常に多く見られます。offset値にマイナスをとれれば、-1のように入れればこれに対応できます。

if arg =~ /^--render-header-offset\s*=\s*(-?[012])$/

とかでしょうか。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.