Edit in JSFiddle

  <div class="library__item library__item--filter">
    <h3 class="library__title"><span>Категории</span> </h3>
    <ul class="library__list">
      <li class="library__list-item active">
        <p>block</p>
        <ul class="library__submenu">
          <li><a href="">Для проектирования</a></li>
          <li><a href="" class="active">Для ааааааа</a></li>
          <li><p>Инструкции</p>
                    <ul class="library__submenu">
                      <li><a href="">1</a></li>
                  </ul>
        </ul>
      </li>
    </ul>
    <ul class="library__list">
      <li class="library__list-item active">
        <p>Публикации</p>
        <ul class="library__submenu">
          <li><a href="">1</a></li>
        </ul>
      </li>
    </ul>
    <ul class="library__list">
      <li class="library__list-item library__list-item">
        <a href="http://www.freefontconverter.com/">Новости и события</a>
      </li>
    </ul>
  </div>
	 ul {
      padding-inline-start: 0;
	 }
   .library__list li p {
	  display: block;
	  border-bottom: 1px solid #e5e5e5;
	}


	.library__list-item.active {
	  position: relative;
	}

	.library__list-item.active:after,
	.library__list-item.active:before {
	  pointer-events: none;
	  position: absolute;
	  content: ' ';
	  background-color: #727272;
	}


	.library__list-item.active:before {
	  width: 4px;
	  height: 20px;
	  top: 12px;
	  right: 15px;
	  transition: 0.3s transform;
	}


	.library__list-item.active:after {
	  width: 20px;
	  height: 4px;
	  top: 20px;
	  right: 7px;
	}


	.library__submenu {
	  display: none;
	}


	.library__list-item.active.opened:before {
	  transform: rotate(90deg);
	}


	.library__list-item>a,
	p {
	  display: block;
	  cursor: pointer;
	  font-size: 16px;
	  line-height: 1.6;
	  color: #232323;
	  text-transform: uppercase;
	  padding: 10px;
	  font-weight: bold;
	}


	.library__submenu {
	  border-bottom: 1px solid #e5e5e5;
	}

	.library__submenu li * {
	  padding-left: 40px;
	}

	.library__submenu li a {
	  font-size: 16px;
	  line-height: 1.6;
	  color: #232323;
	  display: block;
	  text-transform: none;
	  padding: 8px 40px;
	  transition: 0.3s color;
	}

	.library__submenu li a.active {
	  color: #bd362f;
	  font-weight: bold;
	}


	.library__submenu li a:hover {
	  color: #bd362f;
	}

	.library__submenu li:not(:last-child) {
	  border-bottom: 1px solid #e5e5e5;
	}


	ul {
	  list-style-type: none;
	}
  
  a{
    text-decoration: none;
  }
$('.library__list-item.active>p').on('click', function(e) {
    $(this).parent().toggleClass('opened').find('ul').slideToggle();
    e.preventDefault();
    return false;
  });