dvz / mybb-dvzcodetags Goto Github PK
View Code? Open in Web Editor NEWA MyBB 1.8.x plugin for formatting code snippets.
License: ISC License
A MyBB 1.8.x plugin for formatting code snippets.
License: ISC License
After quick editing my post, the code blocks don't show lines, spaces, syntax highlighting or any info about the code. After refreshing the page it shows normally.
The error I got on console was:
Uncaught TypeError: Cannot read property 'children' of null
at prism-line-numbers.min.js:1
at Array.forEach ()
at m (prism-line-numbers.min.js:1)
at NodeList.forEach ()
at prism-line-numbers.min.js:1
DevTools failed to load SourceMap: Co
[code=p-code]
abc
[/code]
[code=p-code]
def
[/code]
When posting the above on my forum, I see both blocks of code containing "def". When editing, nothing is wrong in the source.
As I've stated in MyBB's Discord, the right thing to be concerned is the length of a code block or the total length of code blocks in a page for performance when rendering by client side JS. And limiting the code block count is not ideal.
Turn to this page: https://community.mybb.com/thread-225028.html , the first code block has ~1.5k lines, which slows down the highlighting and makes browser freeze on mobile devices.
I read from code, there are two performance related limits:
prismjs_code_formatter_heavy_count
(via): currently 10 blocks. (maybe only 9 blocks are permitted before stopping rendering?)prismjs_code_formatter_heavy_length
(via): currently 50000 lines.I don't know if the length (2nd limit) is applied on each code block or all code blocks. Ideally, the latter one is preferred.
Take GitHub for example, it doesn't prevent any code from rendering by the number of code blocks or code length. Viewing large code pages in GitHub from mobile devices will possibly have freezing problems.
I don't think it's the site's fault for rendering the whole page of codes, but won't say the user has to bear this as well. A better way, IMO, to deal with it is either:
For me, the second one is better, I think.
https://mybb.com/
```php
phpinfo();
```
Produces:
<a href="https://mybb.com/%7B�DVZ_CT#0" target="_blank" rel="noopener" class="mycode_url">https://mybb.com/{DVZ_CT#0</a>}
Similar problem with:
https://mybb.com/`phpinfo()`
Want to change font color how I can i do it?
Tried from dvz code tag .css but font color not changing.
I'm using mybb 1.8.32 and roundo dark theme
can't you make it compatible with php v 7.0? many ppl got the same version as me and can't just use it, so i hope you can make it as v 7.0.
thanks in advance !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.