Commits on Jan 18, 2017
Commits on Jan 10, 2017
  1. Run gulp

    Golmote committed Jan 10, 2017
Commits on Dec 5, 2016
  1. Update typescript keywords (#1064)

    * Update TypeScript keyword list
    * Add comment with URL to TS spec
    andrewiggins committed with LeaVerou Dec 5, 2016
  2. Set up auto npm publishing

    LeaVerou committed Dec 5, 2016
Commits on Dec 3, 2016
  1. Release 1.6.0

    Golmote committed Dec 3, 2016
  2. Merge branch 'gh-pages' of into gh-p…

    # Conflicts:
    #	components/prism-core.min.js
    Golmote committed Dec 3, 2016
Commits on Nov 20, 2016
  1. Reduce risk of XSS (#1051)

    * Skip non-own properties of env.attributes
    Use `Object.keys` instead of a for-in loop to find optional attributes.
    The former only grabs keys that are own properties, the latter also
    includes inherit properties from `Object.prototype`.
    This reduces the risk of XSS if an attacker somehow manages to
    manipulate the prototype chain of the Object prototype.
    * Fix root cause of XSS in autolinker plugin #1054
    * command-line plugin: Safely encode attributes
    If an attacker has control over the values of the attributes
    "data-prompt", "data-user", or "data-host", then XSS was possible.
    This fixes the issue, by encoding quotes as the `"` entity.
    * show-language plugin: innerHTML -> textContent
    There is no need for `innerHTML` here. At best nothing happens,
    at worst XSS is possible (though the odds are negligible since
    the attacker would have to control the detected language).
    * toolbar plugin: innerHTML -> textContent
    Rob--W committed with Golmote Nov 20, 2016
Commits on Nov 19, 2016
  1. Run gulp

    Golmote committed Nov 19, 2016
  2. Add support for Reason. Fix #1046

    Golmote committed Nov 19, 2016
Commits on Nov 9, 2016
  1. Plugins: Toolbar & Copy to Clipboard (#891)

    * Add prism-toolbar plugin
    This plugin exposes a `registerButton` method, which other
    plugins can use to add buttons to the toolbar. Comes with
    * Add demo file for toolbar plugin
    Registers a "Hello World!" tag with the toolbar.
    * Make `toolbar.registerButton` polymorphic
    This allows developers to provide either a callback or an object
    with a `text` string and an optional `onClick` function to create
    a new button.
    * Add Toolbar & Copy to Clipboard to components.js
    * Add Copy to Clipboard plugin
    * Switch `innerHTML` to `textContent`
    This ensures additional HTML can't be passed to the toolbar
    via the `text` property, ensuring a consistent display for the
    * Use `call` to bind `this` to the `onClick` method
    This provides access to the clicked element, which is what `this`
    is usually bound to on event listeners.
    * Add hover animation to toolbar
    * Add drop shadow to toolbar buttons
    * Add `clipboard` to `optionalDependencies`
    This will install Clipboard.js when installing from `npm`, but
    won't fail the build if the installation of Clipboard.js fails.
    * Load Clipboard.js from CDN if not present
    * Display plugin code using data-src
    * Recompile prism-toolbar
    * Update Show Languages to be a Toolbar button
    Show Languages now registers a callback with the toolbar
    plugin to return an element with the language in it.
    * Add basic HTML API & documentation
    The Toolbar will now be able to read a `data-label` attribute
    and add it to the code snippet.
    * Switch a -> button when only providing onClick
    Also adds a `url` property which creats an anchor tag and sets
    the href. Adds some styles to override the button defaults.
    * Add support for data-url to create anchor tag
    This allows the HTML API to create links in the Toolbar.
    * Update toolbar to allow order controlled via HTML
    Uses a data-attribute on the `body` tag to update the order,
    should the user choose to do so.
    * Allow template element to provide content to label
    This provides one of several options a user can implement in order to
    get a custom button.
    Also fixes some bugs in the documentation.
    * Fix bug when combined with the autoloader plugin
    The autoloader will rehighlight the element after the language arrives.
    This means the complete hook can run multiple times. Without a check,
    multiple toolbars can get added to an element.
    mAAdhaTTah committed with Golmote Nov 9, 2016
  2. Ini: Fix test after #1047

    Golmote committed Nov 9, 2016
  3. Add support for the Jolie language (#1014)

    * Added component for the Jolie language
    * Added Jolie among the supported components
    * update for merge
    - revised jolie component
    - added tests
    - added code example
    - minified with `gulp`
    * fixes
    * fixes
    * fixed Jolie html file example and highlight for punctuation
    * fixed indentation in test html file and added comma as punctuation
    thesave committed with Golmote Nov 9, 2016
  4. Ruby: Fix test after #1023

    Golmote committed Nov 9, 2016
Commits on Nov 1, 2016
  1. Remove important token in ini definition (#1047)

    * rename prism-ini section token to selector
    * updated min file
    * use [ \t] instead of the more general \s
    aviaryan committed with LeaVerou Nov 1, 2016
Commits on Oct 29, 2016
Commits on Oct 24, 2016
  1. Fix greedy-flag bug

    This bug occurs in the relatively rare case of a pattern matching the
    empty string. It was reported in issue #1039. If for example a HTML
    page contains an empty script tag `<script></script>` then the script
    pattern will match anything inside, which is the empty string.
    This empty string is then passed to the constructor of the Token class.
    Since `""` is falsy in Javascript the property `matchedStr` is set to
    But the property `matchedStr` is needed to calculate the current
    position for the greedy feature. A `null` value in `matchedStr` results
    in a `pos` that is `NaN`. This causes the bug described in issue #1039.
    Since the property `matchedStr` is only ever needed to calculate the
    length of the Token, it is more efficient to store the length directly
    instead of the string. As a side effect this also fixes issue #1039.
    zeitgeist87 committed Oct 24, 2016
Commits on Oct 23, 2016
  1. Add yarn.lock (#1035)

    Since many people are like going to use `yarn` over `npm`, it's probably a good idea to add this
    idleberg committed with LeaVerou Oct 23, 2016
Commits on Oct 11, 2016
  1. update patterns (#1032)

    Updated NSIS
    idleberg committed with Golmote Oct 11, 2016
Commits on Oct 10, 2016
Commits on Sep 30, 2016
  1. Merge pull request #950 from dvkndn/gh-pages

    add plugin custom class name
    Golmote committed on GitHub Sep 30, 2016
  2. Reverse prism markup min

    dvkndn committed Sep 30, 2016
Commits on Sep 28, 2016
  1. Fix grammar in Readme

    dvkndn committed on GitHub Sep 28, 2016
Commits on Sep 23, 2016
  1. Update CHANGELOG

    Golmote committed Sep 23, 2016
Commits on Sep 22, 2016
  1. Add iota underbar (#1024)

    It's used by NARS2000 now, and will be used by Dyalog APL in the future.
    jayfoad committed with LeaVerou Sep 22, 2016
Commits on Sep 13, 2016
Commits on Sep 1, 2016