Fix broken markdown

This commit is contained in:
Brian Beck 2017-03-18 12:51:47 -07:00
parent d60a7eee0c
commit 593ac5a01f
4 changed files with 11928 additions and 11928 deletions

View file

@ -4542,14 +4542,12 @@ a particular label, catalog number, barcode, and format.
<td colspan="2" valign="top"><strong>area</strong></td> <td colspan="2" valign="top"><strong>area</strong></td>
<td valign="top"><a href="#area">Area</a></td> <td valign="top"><a href="#area">Area</a></td>
<td> <td>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" valign="top"><strong>date</strong></td> <td colspan="2" valign="top"><strong>date</strong></td>
<td valign="top"><a href="#date">Date</a></td> <td valign="top"><a href="#date">Date</a></td>
<td> <td>
</td> </td>
</tr> </tr>
</tbody></table> </tbody></table>

View file

@ -1,5 +1,4 @@
{ {
"data": {
"__schema": { "__schema": {
"queryType": { "queryType": {
"name": "Query" "name": "Query"
@ -11227,4 +11226,3 @@
] ]
} }
} }
}

View file

@ -3,7 +3,7 @@ import schema from '../src/schema'
if (process.argv[2] === '--json') { if (process.argv[2] === '--json') {
graphql(schema, introspectionQuery).then(result => { graphql(schema, introspectionQuery).then(result => {
console.log(JSON.stringify(result, null, 2)) console.log(JSON.stringify(result.data, null, 2))
}).catch(err => { }).catch(err => {
console.error(err) console.error(err)
}) })

View file

@ -1,5 +1,5 @@
import marked from 'marked' import marked from 'marked'
const schema = require('../schema.json').data.__schema const schema = require('../schema.json').__schema
// Ideally, we could just spit out the existing description Markdown everywhere // Ideally, we could just spit out the existing description Markdown everywhere
// and leave it to be rendered by whatever processes the output. But some // and leave it to be rendered by whatever processes the output. But some
@ -58,7 +58,9 @@ function renderObject (type, { skipTitle = false } = {}) {
console.log(` <td colspan="2" valign="top"><strong>${field.name}</strong>${field.isDeprecated ? ' ⚠️' : ''}</td>`) console.log(` <td colspan="2" valign="top"><strong>${field.name}</strong>${field.isDeprecated ? ' ⚠️' : ''}</td>`)
console.log(` <td valign="top">${markdown(renderType(field.type))}</td>`) console.log(` <td valign="top">${markdown(renderType(field.type))}</td>`)
console.log(` <td>`) console.log(` <td>`)
console.log(` ${markdown(field.description)}`) if (field.description) {
console.log(markdown(field.description))
}
if (field.isDeprecated) { if (field.isDeprecated) {
console.log(' <br/><br/><p>⚠️ <strong>DEPRECATED</strong></p>') console.log(' <br/><br/><p>⚠️ <strong>DEPRECATED</strong></p>')
console.log(` <blockquote>${markdown(field.deprecationReason)}</blockquote>`) console.log(` <blockquote>${markdown(field.deprecationReason)}</blockquote>`)
@ -135,7 +137,9 @@ enums.forEach(type => {
console.log(' <tr>') console.log(' <tr>')
console.log(` <td valign="top"><strong>${value.name}</strong>${value.isDeprecated ? ' ⚠️' : ''}</td>`) console.log(` <td valign="top"><strong>${value.name}</strong>${value.isDeprecated ? ' ⚠️' : ''}</td>`)
console.log(' <td>') console.log(' <td>')
console.log(` ${markdown(value.description)}`) if (value.description) {
console.log(markdown(value.description))
}
if (value.isDeprecated) { if (value.isDeprecated) {
console.log(' <br/><br/><p>⚠️ <strong>DEPRECATED</strong></p>') console.log(' <br/><br/><p>⚠️ <strong>DEPRECATED</strong></p>')
console.log(` <blockquote>${markdown(value.deprecationReason)}</blockquote>`) console.log(` <blockquote>${markdown(value.deprecationReason)}</blockquote>`)