mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 18:43:29 +00:00
Allow quiz titles in validation
This commit is contained in:
@@ -68,7 +68,12 @@ function splitQuestions(nodes) {
|
||||
|
||||
function isQuiz(nodes) {
|
||||
// Extract potential questions
|
||||
var questions = splitQuestions(nodes);
|
||||
var questions = splitQuestions(
|
||||
// Skip quiz title if there
|
||||
nodes.slice(
|
||||
(nodes[0] && nodes[0].type) === 'paragraph' ? 1 : 0
|
||||
)
|
||||
);
|
||||
|
||||
// Nothing that looks like questions
|
||||
if(questions.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user