-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fancy lists, task list and bunch of pandoc extensions #36
Conversation
task list basic support fancy lists basic support raw inlines and raw blocks spans and divs: language, classes strike, underline, superscript, subscript
N.B. Extension-related features currently left out for separate consideration... so you know what could be my wish-list after all the above stuff... In order of importance (from my viewpoint):
|
@Omikhleia This is an impressive list of syntax extension with tens of manhours behind it no doubt. Do I understand it correctly that this PR implements the image part of the Pandoc's |
That's correct, the The hash part could easily be added, though. That will also be needed anyway for header attributes (as in my wish list above)... But again, I first went for the easy-to-reach "low-hanging fruits", in that case the ability to pass e.g. a (Besides, the library has not seen patches and releases from some time now... I have no idea if @jgm still maintains it?) |
I'll defer to @Witiko who is the most active contributor. |
@jgm Not a problem. I will want to port these changes to witiko/markdown, so a code review is the logical first step. |
My question was mainly about attributes on links (i.e. |
886b14c
to
da808d1
Compare
da808d1
to
d8ec95b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks again for all your hard work. In 886b14c, I added style checking to the CI and in d8ec95b, I fixed all warnings emitted by the style checker. This should help us with quality control in future pull requests.
@jgm I also added lunamark-0.6-1.rockspec
and updated changelog
. After the merge, can you please update not yet released
in changelog
, tag the current commit as 0.6.0, and publish version 0.6.0 to Luarocks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed a number of style issues as I am porting the bracketed_spans
syntax extension in Witiko#207. Let's collate these into a separate large pull request sometime later.
larsers.Span = ( parsers.between(parsers.Inline, parsers.lbracket, | ||
parsers.rbracket) ) * ( parsers.attributes ) | ||
/ writer.span |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
larsers.Span = ( parsers.between(parsers.Inline, parsers.lbracket, | |
parsers.rbracket) ) * ( parsers.attributes ) | |
/ writer.span | |
larsers.Span = parsers.between(parsers.Inline, parsers.lbracket, parsers.rbracket) | |
* parsers.attributes | |
/ writer.span |
larsers.Subscript = ( parsers.between(larsers.subsuperscripttext, parsers.tilde, parsers.tilde) ) | ||
/ writer.subscript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
larsers.Subscript = ( parsers.between(larsers.subsuperscripttext, parsers.tilde, parsers.tilde) ) | |
/ writer.subscript | |
larsers.Subscript = parsers.between(larsers.subsuperscripttext, parsers.tilde, parsers.tilde) | |
/ writer.subscript |
larsers.Superscript = ( parsers.between(larsers.subsuperscripttext, parsers.circumflex, parsers.circumflex) ) | ||
/ writer.superscript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
larsers.Superscript = ( parsers.between(larsers.subsuperscripttext, parsers.circumflex, parsers.circumflex) ) | |
/ writer.superscript | |
larsers.Superscript = parsers.between(larsers.subsuperscripttext, parsers.circumflex, parsers.circumflex) | |
/ writer.superscript |
Greetings,
The SILE typesetter has been using (its own local version of) lunamark as one of the available options to process Markdown. Besides being based on an old version, it was in a pretty broken shape... As part of an attempt to revive "native Mardown support" in the SILE with decent extensions, I am proposing a few changes to lunamark, which I am therefore relaying upstream here.
In other terms, this PR contains the following things:
task_list
optionfancy_lists
option1.
, one can usei.
,a.
,a)
, etc.startnum
option is enabledpandoc_extensions
option:~~deleted~~
H~2~O
,2^10^
[text]{.class .other key=value key2="value2" ... }
::: {.class key=value ... } ...
![](image.png}{ key=value... }
) and on fenced block codes (when the corresponding option for them is enabled){=xxx ...}
after a simple inline code (i.e. backticks) or as "extended" infostring on a fenced code block (idem, when those are enabled) -- content skipped by default, but writers can use them to pass-through direct code to their underlying formatter.There are other features I'd possibly want to add at a later point, but it would be great and really cool, if this PR is considered and eventually makes it (in that form or another). Moreover, that would also help SILE removing its local copy/fork of the library and use the official package again! 👍
Thanks in advance for your time and consideration.
Reference: sile-typesetter/sile#1481
(Just for the record. It is (mostly) the same thing, plus the in-progress changes for SILE itself...)