Skip to content
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

<?php tag breaks line numbers #1018

Closed
ghost opened this issue Aug 30, 2016 · 1 comment
Closed

<?php tag breaks line numbers #1018

ghost opened this issue Aug 30, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 30, 2016

In php code preview line numbers break when I add <?php tag.

Here is example by Gabriel Luethje(we have the same issue):
https://codepen.io/FStop/pen/rCBaJ?editors=1111

When "?" in opening php tag is removed the line number works fine.

@Golmote
Copy link
Contributor

Golmote commented Sep 1, 2016

Hi, thanks for reporting.

It looks like I was wrong in #998. We do need to store and restore the original code for the line-numbers plugin to work properly.
Doing so, though, creates an issue when used with the remove-initial-line-feed or the normalise-whitespace plugins. This is because those plugins need to run before the before-highlight hook. Moving them to the before-sanity-check hook appears to solve the problem.

@Golmote Golmote closed this as completed in 86aa3d2 Sep 1, 2016
thesave added a commit to thesave/prism that referenced this issue Sep 2, 2016
* PrismJS/gh-pages:
  Autoloader plugin: don't try to load "none" component. Fix PrismJS#1000
  Optimized block regexps to prevent struggling on large files. Fixes
PrismJS#1001
  Revert PrismJS#998 + run normalize-whitespace and remove-initial-line-feed
plugins in the before-sanity-check hook. Fix PrismJS#1018 (see issue for
discussion)
  Run gulp

# Conflicts:
#	plugins/autoloader/prism-autoloader.min.js
mAAdhaTTah added a commit to mAAdhaTTah/prism that referenced this issue Oct 8, 2016
* gh-pages: (107 commits)
  Reverse prism markup min
  JSON: Fixed issues with properties and strings + added tests. Fix PrismJS#1025
  Fix grammar in Readme
  Update CHANGELOG
  Update APL minified file + update test for iota underbar function
  Add iota underbar (PrismJS#1024)
  Fix typo `Fload` to `Float` in prism-ruby.js (PrismJS#1023)
  Autoloader plugin: don't try to load "none" component. Fix PrismJS#1000
  Optimized block regexps to prevent struggling on large files. Fixes PrismJS#1001
  Revert PrismJS#998 + run normalize-whitespace and remove-initial-line-feed plugins in the before-sanity-check hook. Fix PrismJS#1018 (see issue for discussion)
  Run gulp
  Makes CSS strings greedy. Fix PrismJS#1013
  update min file and reverse core
  add prefix feature for custom class plugin
  Make doctype case insensetive (PrismJS#1009)
  Optimize images (PrismJS#1007)
  Restore `viewBox` to Prism logo (PrismJS#1002)
  Remove unneeded prefixed CSS (PrismJS#989)
  Fix WPD plugin's page
  Fix WPD at-rule detection + don't process if language is not handled + fix plugin's page
  ...

# Conflicts:
#	plugins/show-language/prism-show-language.css
#	plugins/show-language/prism-show-language.js
#	plugins/show-language/prism-show-language.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant