1 Star 0 Fork 0

凉鞋/lunamark_sync

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TODO 2.32 KB
一键复制 编辑 原始数据 按行查看 历史
* TODO fix other writers to use new ropes
_ man
_ tex
_ context
_ latex
* TODO citations using independent citeproc program
- might need two passes for this, one to generate the list of
citations, which can then be passed to citeproc for processing
on the next pass. otherwise footnotes will be screwed up.
- there can be a special writer for the first pass, which skips
everything but citations and just stores them in a list.
* TODO math in $, $$
* TODO fenced code block extension
* TODO alternative indented code block with metadata?
This is text.
code {
in indented = block
}
--- haskell
code {
in indented = block
}
[haskell]
More text.
* TODO layout: indentation options?
* TODO latex reader - write peg
* TODO mathml - look at pandoc2?
* TODO make epub tool
* TODO make pdf tool
* TODO documentation, including extending writer + parser
Notes on a possible macro system: Simply add a function
to the writer:
W.name = function(last,first)
return first .. writer(space) .. writer.strong(last)
end
W.repeat = function(num,x)
return string.rep(x, tonumber(num))
end
When lunamark encounters %name{<inlines>}{<inlines>}
or %repeat[7]{Hi there%space}, it simply calls the writer.name function.
Note that writer.space is currently not a function; maybe that should
change for uniformity. We may want macros with no arguments that
need to be functions: e.g. %currenttime.
Probably we'd need several types of arguments:
* parsed inline lists
* parsed block lists
* raw text
Also we'd have to know whether to parse as a block or an inline.
So perhaps we'd need two different kinds of macros.
* inline macros:
%name{<inlines>} -- with inline argument
%name[raw text] -- with raw argument
* block macros
.admonition{<inlines>}{| -- multiline block
<blocks>
|}
.startsource[|
multiline raw text - first newline ignored
|]
These macros are all on the writer side. What about the reader side?
E.g. what if we want a macro
#include[myfile.txt]
that reads myfile.txt and parses the source as markdown?
This can't happen in the writer. But there could be a way to
register a reader macro. This would simply call a match-time
parser function that directly modifies the input string.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liangxiegame/lunamark_sync.git
git@gitee.com:liangxiegame/lunamark_sync.git
liangxiegame
lunamark_sync
lunamark_sync
master

搜索帮助