electron / electron-docs-linter

Parse and validate Electron's API documentation
http://npm.im/electron-docs-linter
21 stars 24 forks source link

Preserve newlines and backticks in method descriptions #99

Open zeke opened 7 years ago

zeke commented 7 years ago

For example, https://github.com/electron/electron/blob/master/docs/api/app.md#apprelaunchoptions is composed of several paragraphs.

const apis = require('electron-api-docs/tree')

console.log(apis.app.methods.relaunch.description)

currently produces

Relaunches the app when current instance exits. By default the new instance will use the same working directory and command line arguments with current instance. When args is specified, the args will be passed as command line arguments instead. When execPath is specified, the execPath will be executed for relaunch instead of current app. Note that this method does not quit the app when executed, you have to call app.quit or app.exit after calling app.relaunch to make the app restart. When app.relaunch is called for multiple times, multiple instances will be started after current instance exited. An example of restarting current instance immediately and adding a new command line argument to the new instance:

See https://github.com/electron/electron-i18n/issues/58