silicon icon indicating copy to clipboard operation
silicon copied to clipboard

Feature: Added a code-right-pad option and fixed highlight-lines documentation

Open vivaansinghvi07 opened this issue 1 year ago • 0 comments

This PR contains two changes.

First, a small fix in the documentation for the --highlight-lines option, as can be seen here:

/// Lines to high light. rg. '1-3; 4'

But calling this with the suggested example,

$ silicon test.py --output test.png --highlight-lines '1-3; 4'

raises the following error:

error: Invalid value for '--highlight-lines <LINES>': invalid digit found in string

The proposed change fixes this by removing the space in the string. It also fixes some typos in the documentation comment.

The second change is regarding padding to the right of the code. Sometimes, the generated code screenshot feels somewhat "squished" to me. Here's an example of a C file I tried Silicon on just for fun.

image

Here is the same code screenshot with the new --code-pad-right option set to 75 instead of the default 25.

image

It gives more of a gap on the right of the code, like how it is when normally editing code.

vivaansinghvi07 avatar Mar 11 '24 21:03 vivaansinghvi07