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

Fix replace font tag for color highlight #167

Closed
wants to merge 1 commit into from
Closed

Fix replace font tag for color highlight #167

wants to merge 1 commit into from

Conversation

vietlubu
Copy link
Contributor

@vietlubu vietlubu commented Mar 8, 2018

My current solution for issue #166
I explode string with ^000000 and replace color height to HTML font tag.
If you have any way easier, please suggest or open a pull request.
I already test and compare the results. You can check first 200 lines compare file here
Result: Item ID 990
screen shot 2018-03-08 at 11 04 29 am

@cydh
Copy link
Contributor

cydh commented Jun 17, 2018

how about

$p = $array[$i];
$p = preg_match('\^000000', '</font>', $p);
$p = preg_match('(\^)([a-fA-F0-9]{6})', '<font color="#$2">', $p);

EDIT: it has been stuck in my mind, than using preg_match because we always think that ^ccaabb asd ^00000 as <font color="#ccaabb"> asd </font> but it supposed to be <font color="#ccaabb">asd </font><font color="#000000"> (until it's closed)</font>

@cydh cydh mentioned this pull request Jun 22, 2018
@Akkarinage
Copy link
Member

This Pull Request has been superseded by #327

@Akkarinage Akkarinage closed this Oct 2, 2022
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.

3 participants