Giter Club home page Giter Club logo

Comments (3)

jwhitlock avatar jwhitlock commented on August 16, 2024 1

I have found some examples of "colon-macros" used on MDN pages. For example, this page:

https://developer.mozilla.org/en-US/Add-ons/Code_snippets/File_I_O

uses {{ Storage:synchronous_io_warning() }} several times. So, we will need to translate colons in KumaScript macro names into file-safe characters.

My preference is Storage-synchronous_io_warning.ejs. It looks a little clumsy, but moves toward dashes for namespacing rather than colons.

from kumascript.

jwhitlock avatar jwhitlock commented on August 16, 2024

The colon (:) is one of the characters that can't be used in a filename on a Windows filesystem, and we should change the filenames of these macros that use it. The set of disallowed characters (MSDN source) are:

  • < (less than)
  • > (greater than)
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

We're already normalizing case, so that {{CompatNo}} and {{compatno}} both work. Maybe we can extend this so that the filename for {{MDN:Common}} is one of:

  • MDN_Common.ejs
  • MDN-Common.ejs
  • MDN.Common.ejs

The macro usage could still include the colon.

Or, we could change all the internal usage of these macros in one PR. I'll need to double check if any "colon-macros" are used on pages.

from kumascript.

jwhitlock avatar jwhitlock commented on August 16, 2024

The staff discussed this and agreed to use a dash (-) instead of a colon (:) in the filenames. The tasks are:

from kumascript.

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.