Comments (2)
Hi @alexgarces ,
The weird closing tag is added by browser since the HTML inside hljs
directive element will get parsed by the browser even before AngularJS bootraped.
I think the reason that the same issue doesn't happen on HTML codes is usually you'll have a well-formed HTML code inside hljs
. And in the C++ case, <cv::Point>
is a tag that browser doesn't recognize and there's no closing tag for it.
To deal with most of these issues, use hljs-source
or hljs-include
rather than putting the code inside hljs
directive directly.
<div hljs hljs-language="cpp" hljs-include="'cpp-example'"></div>
<script type="text/ng-template" id="cpp-example">
std::vector<cv::Point> init_positions;
</script>
from angular-highlightjs.
It worked! Thanks a lot.
from angular-highlightjs.
Related Issues (20)
- Electron App: Uncaught Error: Cannot find module 'angular' HOT 3
- Comments added when <?php tags are included in the snippet HOT 1
- Nested hljs HOT 1
- HLJS content rendered event HOT 4
- Allow use of <pre><code> tags instead of <div hljs> HOT 2
- "hljs-source" needs to be changed to "source" in the README HOT 1
- Showing "loading" message HOT 4
- Some blank lines are deleted HOT 6
- use require.js was Error HOT 2
- end element is getting added automatically HOT 1
- There are a compatibility problem with highlight v 9
- Less-than-sign displaying as < HOT 2
- Not working with dynamically pulled data HOT 7
- dependency on highlight.js issue HOT 9
- make editable and set on ngmodel
- How to use with Webpack? HOT 3
- Cant figure out hljs-source HOT 2
- yarn.lock with [email protected] HOT 1
- security issue with dependencies HOT 2
- Command Injection vulnerability found in shelljs dependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-highlightjs.