Skip to content

Search Plugin doesn't indexes text inside a bulleted and numbered list #1366

Closed
@Nipun-Suradkar

Description

@Nipun-Suradkar

Bug Report

The Docsify search plugin is not able to create proper indexes of test under a bulleted and numbered list. So we are not able to search for the text in these lists using docsify search plugin.

Steps to reproduce

index.html :

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="Description">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      loadSidebar: true,
      search: {
        paths: 'auto',
        placeholder: 'Search',
      }
    }
  </script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
</body>
</html>

README.md

# Bulleted and Numbered List

## Bulleted List
* No statically built html files
* Simple and lightweight
* Smart full-text search plugin
* Multiple themes

## Numbered List
1. Useful plugin API
2. Emoji support
3. Compatible with IE11
4. Support server-side rendering (example)


## Example.com
This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.

What is current behaviour

docsify.search.index :

bug

As we can see the docsify.search.index has no body key inside the #/README?id=bulleted-list and #/README?id=numbered-list . Thus we can't search for text inside those lists

What is the expected behaviour

We should be able to search for text inside Bulleted and Numbered List.

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: Ubuntu 18.04

  • Node.js version: 12.16.1

  • npm/yarn version: 6.14.8

  • Browser version: Chrome 83

  • Docsify version: 4.4.1

  • Docsify plugins: search

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions