项目作者: brendanmetzger

项目描述 :
An extendable 'markdown' library according to particular formatting needs.
高级语言: PHP
项目地址: git://github.com/brendanmetzger/format.git
创建时间: 2018-03-28T15:27:16Z
项目社区:https://github.com/brendanmetzger/format

开源协议:

下载


Modeled MarkDown

A markdown parser that constructs valid, formated DOM objects, allowing callbacks to re-render documents as desired.

Goals

  • terse code, no dependencies
  • valid xHTML output
  • formatted
  • Queryable and mutable
  • Parser callbacks

TODO

  • render nested lists
  • capture new lines in pre
  • DOM back to markdown
  • design method to render figure and figcaptions (using context callback from preceding prob.. see note)
  • replace ‘ with actual apostrophe
  • think of syntax for definition lists
  • Add callback for time elements
  • titles in anchors and image captures
  • render processing instructions
  • capture links betwixt < > (not implemented, but adde regex in note.)
  • render lists
  • render headings
  • render links
  • render images
  • render Inline elements
  • render blockquotes
  • render pre
  • section-izing parser callback implementation
  • deal with & and other entities

Under Consideration

  • Checkboxes
  • other inputs (select menus, input ranges… things that are useful for interactivity)

Notes

rather than bloat the code with complicated syntax to make things like figure and figcaption, consider contextual callbacks, ie., something like an


followed by a followed by a

text

would create a
text
. This would be done using xpath + callbacks, ie addCallback(‘//hr/following-sibling::img/following-sibling::p, function($doc))