-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Added code element with code highlighter. #87
Conversation
- Renamed CodeHighlighter into CodeRenderer - Moved CodeRenderer into a HTML folder
@xiCO2k Let's start to discuss this PR :))) |
Hey @butschster will check later today. sorry for the delay. |
Ok I changed the encoding and it works well, there is any way to not need to convert the chars? |
Unfortunately no ((( DOMNode always tries to make HTML valid during export, that's why html inside code element should be converted to html entities. |
Yes you are right. will check the changes, and let you know right after. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why not rename the toElement
method and call it render
like we have on the HtmlRenderer
?
Thanks, sorry for the delay reviewing it.
@xiCO2k I like |
# Conflicts: # src/Html/TableRenderer.php # src/HtmlRenderer.php
Lets keep the |
@butschster Find some issues.
|
Yeah, I thought about it. Is there any chance to find out how many spaces we should get rid of?! Look at this code example: <code>
public function test() {
.....
}
public function test1() {
.....
}
}
?>
</code> |
I decided not to use code from
nunomaduro/collision
package and copied Code Highlighter with some modifications.$linesBefore
,$linesAfter
with$startLine
!!! Users have to convert all applicable characters to HTML entities inside
code
element !!!Will render
fixes #82