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

Colored highlighter removes spaces if spaces are in the first 3 tokens #414

Open
schrauger opened this issue Mar 12, 2022 · 3 comments
Open
Labels
⚠️ bug Categorize bug reports.

Comments

@schrauger
Copy link

With the default highlighter mode, which highlights the first 3 tokens/characters, the highlighting function causes spaces to be removed if any of the first three characters is a space.

Input:
{A Section Here}

Expected Output:
"A Section Here" or "A Section Here"

Actual Output:
"ASection Here"

Most headers are more than 3 characters, and the non-highlighted portions keep the spaces, so this problem doesn't appear to affect the average resume created.

If you change the highlight function to increase the number of characters highlighted, this become a more noticeable problem. However, even with 3 characters, I ran into this issue when I wanted to start a section with a single character or two character word, followed by a space, and another word. The coloring functionality removes the space.

@github-actions
Copy link

👋 Welcome! Looks like this is your first issue.

Hey, thanks for your contribution! Please give us a bit of time to review it. 😄

@OJFord OJFord added the ⚠️ bug Categorize bug reports. label Mar 12, 2022
@schrauger
Copy link
Author

schrauger commented Apr 5, 2022

I found a workaround for now. If you use a backslash before the space, it prints correctly.

Input:
{A\ Section Here}

Output:
"A Section Here"

@dcsim
Copy link
Contributor

dcsim commented Apr 11, 2022

This is most likely a result of the spaces not being tokenized and thus "accidentally' removed when passed here:

% Awesome section color
\def\@sectioncolor#1#2#3{%
  \ifbool{acvSectionColorHighlight}{{\color{awesome}#1#2#3}}{#1#2#3}%
}

Using a ~ instead of a space solves it, e.g. A~Section, as does using a \ as suggested by @schrauger.

This might be addressed more easily with documentation than trying to push a fix and could probably be included with some friendly documentation about other common headaches, e.g. using \& rather than &.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ bug Categorize bug reports.
Projects
None yet
Development

No branches or pull requests

3 participants