Page MenuHomeSolus

Initial commit of pandoc-include-code
Needs ReviewPublic

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

Details

Reviewers
None
Group Reviewers
Triage Team
Maniphest Tasks
T9284: pandoc-include-code
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"><a class="sourceLine" id="cb1-1" data-line-number="1"> 
<span class="pp">#include </span><span class="im">&lt;stdio.h&gt;</span></a>
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="dt">int</span> main() {</a>
<a class="sourceLine" id="cb1-3" data-line-number="3">   printf(<span class="st">&quot;Hello, World!&quot;</span>);</a>
<a class="sourceLine" id="cb1-4" data-line-number="4">   <span class="cf">return</span> <span class="dv">0</span>;</a>
<a class="sourceLine" id="cb1-5" data-line-number="5">}</a></code></pre></div>

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

liontiger23 created this revision.Sun, Nov 15, 9:17 AM
liontiger23 requested review of this revision.Sun, Nov 15, 9:17 AM
liontiger23 edited the test plan for this revision. (Show Details)Sun, Nov 15, 9:36 AM
liontiger23 edited the test plan for this revision. (Show Details)