Comments (5)
Thanks for the review @frangio I updated the PR #297 and opened a second one for the babelXRollup #298
from docs.openzeppelin.com.
Thanks for the issue. Please open a PR.
The fix should go in 07-copy-code.js.
If we detect that the code being copied is shell commands, we should remove any leading $
. We should try to only do this if the code was configured as a shell/console block by inspecting the class
of the code
element.
from docs.openzeppelin.com.
Thanks for the insight @frangio. I have working code on my local but was wondering if I can get your opinion on an aspect of the solution.
First, I noticed that the wrapping code has a class of language-sh
and a data-lang="sh"
. In my solution, I'm referencing the data attribute and not the class as it's generally more reliable and prefered over classes. Does that sound acceptable in your opinion?
Second, I noticed that for shell commands we are using language-sh
and a data-lang="sh"
but in the highlight.js docs they support multiple shell related syntax and aliases. source: https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
Should I account for all possible shell languages and aliases (future proof) or just the currently used language-sh
/ data-lang="sh"
?
Thanks again!
from docs.openzeppelin.com.
Using data-lang
is fine.
Let's try to support all aliases, because we're not being consistent across the docs and we use different kinds of language names. The following should suffice: console
, shell
, sh
, bash
.
from docs.openzeppelin.com.
Thanks @frangio, I opened the pull request.
from docs.openzeppelin.com.
Related Issues (20)
- Add easy way to add forum widget with list of posts
- Add a section about OZ Upgradeable Contracts in upgrades learn guide
- Broken reference link: "guide for ERC20 tests" HOT 1
- Maintain naming convention HOT 3
- Too many arguments given in erc777 _mint example HOT 1
- upgrading-smart-contracts.adoc HardhatError: HH701: There are multiple artifacts for contract "Box", please use a fully qualified name. HOT 2
- Updating example code on Access Control HOT 1
- Indexed modiffier missing on events HOT 3
- Fix url exceeding div width
- Missing nile docs page HOT 1
- Long names cause UI readability issues
- Events reference broken sometimes HOT 1
- Add Sepolia Testnet ETH faucet HOT 1
- Add dark mode theme
- CREATE2 documentation is incorrect HOT 4
- Search results ignore version of the current page
- incorrectly rendered Latex HOT 1
- Enhance OpenZeppelin Documentation for Solidity Version Compatibility in Hardhat Projects
- Display version of OZ selected by default in the mobile view as well
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 docs.openzeppelin.com.