Giter Site home page Giter Site logo

markdowntoasciidoc's People

Contributors

niszet avatar yoshiri avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

niszet

markdowntoasciidoc's Issues

Pandocに対応したsample.mdの更新

ブログでコメントした者です。Pandocでのadocへの変換について、いくつかはmarkdown側の書き方の問題と思われる箇所があったため、sample.mdを更新したものを後ほどPR出しますので、ご参考になればと思います。

PRには変換したsample_pandoc.adocも含めています。本commitではsample.mdに対して以下の対応をしています。

  • インラインのCode、...について前後に半角空白を入れています。
  • <>は自動でリンクとみなされるため、例示箇所は<..>としています。
  • 定義参照リンクは2つの[]の間に空白を入れると認識されないため、これを詰めています。

また、以下はPandoc側の問題であることが分かっており、ファイルやオプションの変更では対応できないとみています。

  • 番号付きリストは基本的に[arabic]が自動でつくので記号にはならない(これは現状でも対応できるかもしれませんが、調査不足)
  • Pandocで出力するadoc形式にはhtmlは埋め込められないため、<s>タグなどは対応できないです。
  • ハイフンの並びは他の記法とぶつかることが多いので、使用を推奨しません(sample.mdはこれを修正していません)
  • ネストしたBlockQuoteはPandoc側に問題があり対応できていません(問題個所は把握しました)
  • h1レベルが--shift-heading-level-by=-1すると消え、titleとしても保存されない

変換に使用したコマンドは以下のとおりです。

pandoc sample.md -o sample_pandoc.adoc  --shift-heading-level-by=-1
asciidoctor sample_pandoc.adoc 

使用したPandocのバージョンは、

> pandoc --version
pandoc 2.11
Compiled with pandoc-types 1.22, texmath 0.12.0.3, skylighting 0.10.0.2

asciidoctor のバージョンは

> asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

です。

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.