chanan / blazorprettycode Goto Github PK
View Code? Open in Web Editor NEWBlazor Code Component for Documentation Sites
Home Page: https://chanan.github.io/BlazorPrettyCode/
License: The Unlicense
Blazor Code Component for Documentation Sites
Home Page: https://chanan.github.io/BlazorPrettyCode/
License: The Unlicense
Local looks fine, but on Github it isn't
<PrettyCode CodeFile="https://raw.githubusercontent.com/chanan/BlazorStyled/master/src/Sample/Pages/Index.razor" CodeFileLineNumbers="13-15" CodeSectionFileLineNumbers="21-34,37" />
CSHTMLTokenizer 0.8 has css tokenization add to PrettyCode
$
in front of a quote mark or in front @"
mark$"{colorMe}"
Allow themes to color the quote marks. For example Winter Is Coming Dark:
{
"Name": "Quotes",
"Settings": { "color": "#6bff81" }
},
API:
<PrettyCode CodeFile="uri" />
This will do exactly what CodeFile
did previously
<PrettyCode CodeFile="uri" CodeSectionFile="uri2" />
This will append the contents of CodeSectionFile below CodeFile. If CodeSectionFile is not wrapped with: @code { }
then it will be wrapped automatically.
Line numbers are also supported:
<PrettyCode
CodeFile="uri"
CodeFileLineNumbers="1-50"
CodeSectionFile="uri2"
CodeSectionFileLineNumbers="52,55-60"
/>
If CodeSectionFile
is not defined but CodeSectionFileLinesNumbers
is defined, then it will be assumed that the code section is in the same file as CodeFile
Use openRegion and remove use of dynamic sequence number in build render
The Less Than symbol < produces "<<>" when not associated with a tag. Using < does not work as a workaround.
Add a border-left to HighlightLines so that lines are highlighted even when numbers are off (see overreacted.io)
Also allow to customize highlight color?
BlazorStyled works in SSB mode. Ensure BlazorPrettyCode does as well, update docs if needed.
When an error occurs output the file name of the code snippet that caused the error
Hello, How to use this JS with HTML ?? like: <code>my code here..</code> ?
Work around: directly link to the json like so: https://raw.githubusercontent.com/chanan/BlazorPrettyCode/master/src/BlazorPrettyCode/wwwroot/WinterIsComingDark.json
Support will be added to BlazorStyled. Use BlazorStyled's support in BlazorPrettyCode
Currently only Parse errors are displayed, other errors may occur.
This might be a big in CSHTMLTokenizer.
<PrettyCode CodeFile="https://raw.githubusercontent.com/chanan/BlazorStyled/master/src/Sample/Pages/Basic.razor"
CodeFileLineNumbers="2,14"
CodeSectionFileLineNumbers="46,49-52" />
I need to colorize and format a JSON snippet in Blazor. IOs this a good comonent to do that If not, do you have a recommendation?
<PrettyCode CodeFile="https://raw.githubusercontent.com/chanan/BlazorStyled/master/src/Sample/Startup.cs" CodeFileLineNumbers="11,12,16,17" />
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.