Open nitek29 opened 2 years ago
This is because code blocks in the application will result in a specific style in Word document. It would be possible to add syntax highlighting in the application but it won't be added in the generated report. So to be coherent between both the application and the report it was not added.
Thank for your reply. In this case, is it not possible to update the style in Word document too ?
I did not find a way to do that easily. Also the fact that the application is common to everyone and the Word document is specific to everyone makes it too complex to maintain consistency across everyone
Hi @yeln4ts, I get your point on adding code styling in pwndoc and using the document's styles is a good idea. Unfortunately it is not supported by google docs (it natively supports just normal text and headings from h1 to h6). This lead to code not be styled at all.
Considering the widespread of using google services, is there any chance you can reconsider the option to add some sort of styling directly in the app?
Even something default like Consolas font, white text, black background should be fine. In this way who use word and the defined code style will continue to see the code using the defined style, who do not use word will see something that at least looks like code instead of normal text.
There already is a style in the application for code blocks and code.
Yeah, sure. Unfortunately those two apply a style in the docx based on a style. In case you use Google docs such style doesn't exists and the code is just formatted as normal text.
I don't think there is any solution to your issue then if Google docs does not apply styles.
@mrnfrancesco Use table or paragraph with border instead of the codeblock style can be a solution. What do you thing about that ?
Using a table/paragraph with borders make easier to isolate the code to the other text, but it still need at least a monospace font to render correctly.
For me the correct solution to match everyone needs is to use syntax highlight or any other code formatting directly as HTML in the app without using a document style. Basically the same that happens when you copy/paste code from VSCode into Word.
FYI #355
Hey,
It will be great if we can somehow mark/style parts of text in a command output or source snippet so they can stand out. Ideally, we can either bold them, change their color, or distinguish them in another way. The problem is that it is not possible to format the text in the code and code block styles in the UI. For example, highlighting the vulnerable header in an HTTP request. It's not a question of style functionnality in the .docx template. Whatever is easier to implement, I am sure we can get it to work.
Thanks!