Skip to content

Update syntax highlighting #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bramz
Copy link
Contributor

@bramz bramz commented Mar 5, 2019

Introduction

Added a method to handle language checking for syntax highlighting.

Review

  • Tested

  • Ready to Review
  • Ready to Merge

@bramz bramz added the enhancement New feature or request label Mar 5, 2019
@bramz bramz requested review from Tiksi, RaasAhsan and ncatelli March 5, 2019 03:58
function initPaste(){
inPastePre = getPastePre();
highlightPre(inPastePre);
}
function codeType(){
if(window.location.hash){
var lang = window.location.hash.substr(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without a listener to call this, adding the #language won't change the language highlighting, look at how changestyle works:

window.addEventListener("hashchange", changeStyle, false);
to call the function when it changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants