Skip to content

Conversation

@westonruter
Copy link
Owner

Closes #9.

Now that the mark element is being used to indicate highlighted lines, there is graceful degradation when stylesheets omitted. This means that when rendering code blocks in RSS feeds or the REST API, it makes sense to go ahead and render the Code blocks with highlight.php, as opposed to skipping entirely.

@westonruter westonruter requested a review from allejo May 4, 2020 04:14
@allejo
Copy link
Contributor

allejo commented May 6, 2020

This means that when rendering code blocks in RSS feeds or the REST API, it makes sense to go ahead and render the Code blocks with highlight.php, as opposed to skipping entirely.

Solely out of curiosity, is the reason we're still marking up code with highlight.php so RSS readers or REST consumers can add their own hljs themes and be compatible with this plugin's code snippets?

westonruter and others added 2 commits May 6, 2020 07:43
Co-authored-by: Vladimir Jimenez <[email protected]>
…ode-block into update/style-printing

* 'master' of github.com:westonruter/syntax-highlighting-code-block:
  Rename parseSelectedLines as parseHighlightedLines
  Migrate our deprecated Gutenberg settings
  Run build during install
  Bump @wordpress/scripts from 8.0.1 to 9.0.0
  Bump @wordpress/i18n from 3.11.0 to 3.12.0
  Bump @wordpress/editor from 9.14.1 to 9.15.0
  Rename attributes
  Bump @wordpress/components from 9.4.1 to 9.5.0
@westonruter
Copy link
Owner Author

Solely out of curiosity, is the reason we're still marking up code with highlight.php so RSS readers or REST consumers can add their own hljs themes and be compatible with this plugin's code snippets?

Yes, that would be a good reason. But also when there are highlighted lines, those will now be displayed in feed readers even without styles since they're using the mark tag now.

@westonruter westonruter merged commit 9c21913 into master May 6, 2020
@westonruter westonruter deleted the update/style-printing branch May 6, 2020 16:08
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

Successfully merging this pull request may close these issues.

Short-circuit server-side rendering in RSS feed?

3 participants