Code Monkey home page Code Monkey logo

Comments (5)

TatisLois avatar TatisLois commented on August 29, 2024 1

Thanks for the review @frangio I updated the PR #297 and opened a second one for the babelXRollup #298

from docs.openzeppelin.com.

frangio avatar frangio commented on August 29, 2024

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.

TatisLois avatar TatisLois commented on August 29, 2024

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.

frangio avatar frangio commented on August 29, 2024

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.

TatisLois avatar TatisLois commented on August 29, 2024

Thanks @frangio, I opened the pull request.

from docs.openzeppelin.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.