Page MenuHomeSolus

Initial commit of pandoc-include-code
ClosedPublic

Authored by liontiger23 on Nov 15 2020, 9:17 AM.

Details

Summary

Initial commit of pandoc-include-code

Resolves T9284

Test Plan

Tested using sample markdown document:

$ cat test.c
#include <stdio.h>
int main() {
   printf("Hello, World!");
   return 0;
}
$ cat test.md
# Title

Here is how "Hello, World!" program looks like in C:
```{.c include=test.c .numberLines}
```
$ pandoc -F pandoc-include-code test.md -o test.html
$ cat test.html
<h1 id="title">Title</h1>
<p>Here is how “Hello, World!” program looks like in C:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode numberSource c numberLines"><code class="sourceCode c"><span id="cb1-1"><a href="#cb1-1"></a><span class="pp">#include </span><span class="im">&lt;stdio.h&gt;</span></span>
<span id="cb1-2"><a href="#cb1-2"></a><span class="dt">int</span> main() {</span>
<span id="cb1-3"><a href="#cb1-3"></a>   printf(<span class="st">&quot;Hello, World!&quot;</span>);</span>
<span id="cb1-4"><a href="#cb1-4"></a>   <span class="cf">return</span> <span class="dv">0</span>;</span>
<span id="cb1-5"><a href="#cb1-5"></a>}</span></code></pre></div>

Diff Detail

Repository
R5202 pandoc-include-code
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

liontiger23 created this revision.Nov 15 2020, 9:17 AM
liontiger23 requested review of this revision.Nov 15 2020, 9:17 AM
liontiger23 edited the test plan for this revision. (Show Details)Nov 15 2020, 9:36 AM
liontiger23 edited the test plan for this revision. (Show Details)
DataDrake requested changes to this revision.Dec 16 2020, 7:19 AM
DataDrake added a subscriber: DataDrake.
DataDrake added inline comments.
package.yml
26

Does this work without registering? Just wondering sicne I don't think we really need the static lib, but I could see pandoc requiring the .conf

This revision now requires changes to proceed.Dec 16 2020, 7:19 AM
liontiger23 edited the test plan for this revision. (Show Details)

Removed %cabal_register

liontiger23 marked an inline comment as done.Dec 16 2020, 4:47 PM
liontiger23 added inline comments.
package.yml
26

Works fine without registering.

liontiger23 marked an inline comment as done.

Rebuild against pandoc 2.5

liontiger23 edited the test plan for this revision. (Show Details)Dec 25 2020, 2:28 AM

Fix padding

liontiger23 added inline comments.Dec 25 2020, 2:37 AM
package.yml
15

Not sure if I need to add rundeps for the actual filters. Probably nobody will use them as dependencies...

Pinging @DataDrake for re-review.

DataDrake accepted this revision.Fri, Apr 23, 3:04 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Fri, Apr 23, 3:04 PM
This revision was automatically updated to reflect the committed changes.