Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

vivaansinghvi07
Copy link
Contributor

@vivaansinghvi07 vivaansinghvi07 commented Mar 11, 2024

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.

@Aloxaf Aloxaf merged commit f5c0412 into Aloxaf:master Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants