googlearchive / workbox-microsite

Workbox Microsite
Apache License 2.0
24 stars 13 forks source link

Markdown renderer can't handle multiple-line code samples in lists. #10

Closed jpmedley closed 7 years ago

jpmedley commented 7 years ago

The source that produced this is here.

rendered

gauntface commented 7 years ago

This is malformed markdown.

To have something considered as part of the list item you need to indent by 4 spaces. Doing this fixes your problem.

Also worth calling out there is a mix of tabs and spaces that can upset all of this as well.

The following works:

---
layout: page
title: Get Started > Gulp
---

# Gulp

1. [Install Node.js](https://nodejs.org/en/).
1. Install the module with NPM.
npm install --save-dev sw-build
```
  1. Require sw-build in your build script.

    const swBuild = require('sw-build');
  2. Add the following to your gulpfile.js:

    gulp.task('build', () => {
      const swBuild = require('sw-build');
      return swBuild.generateSW({
        rootDirectory: './build/',
        swDest: './build/sw.js',
        globPatterns: ['**\/*.{html,js,css}'],
        globIgnores: ['admin.html'],
        templatedUrls: {
          '/shell': ['shell.hbs', 'main.css', 'shell.css'],
        },
      })
      .then(() => {
        console.log('Service worker generated.');
      })
      .catch((err) => {
        console.log('[ERROR] This happened: ' + err);
      });
    })
jpmedley commented 7 years ago

My link may be out of date, but I tried every variation I could think of before opening this ticket.

gauntface commented 7 years ago

Do you want me to commit the fix to your doc branch?

jpmedley commented 7 years ago

Please. If you know something I've overlooked...

Joe Medley | Technical Writer, Chrome DevRel | jmedley@google.com | 816-678-7195 If an API's not documented it doesn't exist.

On Fri, May 12, 2017 at 9:51 AM, Matt Gaunt notifications@github.com wrote:

Do you want me to commit the fix to your doc branch?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/workbox-microsite/issues/10#issuecomment-301128930, or mute the thread https://github.com/notifications/unsubscribe-auth/AH0vi4dhzdOji7hiS_S78E4xKZz08C0zks5r5I4agaJpZM4NYzIr .

jpmedley commented 7 years ago

No joy.

wmqkhcu5dgc

jpmedley commented 7 years ago

@gauntface FYI

gauntface commented 7 years ago

My view from docs branch right now.

Did you git pull, and ctrl + shift + r?

screenshot from 2017-05-12 10 03 00

jpmedley commented 7 years ago

Doesn't work. Neither does deleting node_modules/ and reinstalling.

gauntface commented 7 years ago

Joe updated and I believe got it work - travis and my local thing seemed fine with changes above.