Giter Site home page Giter Site logo

adhocore / htmlup Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 6.0 79 KB

Light and fast markdown parser, that parses markdown in a way human does

License: MIT License

PHP 100.00%
adhocore htmlup markdown markdown-parser markdown-to-html php php-markdown-parser

htmlup's Introduction

Hi there πŸ‘‹

Jitendra's github stats

Stats ranks: S (top 1%), A+ (12.5%), A (25%), A- (37.5%), B+ (50%)

Top Lang's GitHub Streak

πŸ”– View the badges I unlocked in GitHub and holopin.


If you love OpenSource, understand the value of it and appreciate the idea of how developers provide & maintain free & open source softwares, tools & libraries that take significant effort, please consider supporting me, thank you. ☺️

htmlup's People

Contributors

adhocore avatar dependabot-preview[bot] avatar peter279k avatar stylecibot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

htmlup's Issues

Bold item in a list

Introduction

Even if the code is 6 years old and a newer version exists, I'm trying to integrate it to a small wiki script. Anybody noticed that we cannot use bold on the first letter/word on an item of a list?

  • Bug/Issue
  • Feature request
  • General stuff

Describe the bug/issue

I wanted to do this:

  • This text is in bold

What happened

However, it will display

  • This text is in bold**

Without converting it in bold, but removing the first 2 stars.

What is expected

I need your help to find a quick fix. I looked and tried some tweaks, but without success.

Sample code

// list if ($ul = in_array($mark12, array('- ', '* ', '+ ')) OR preg_match('/^\d+\. /', $mark12)) { $wrapper = $ul ? 'ul' : 'ol'; if (empty($inList)) { $stackList[] = "</$wrapper>"; $markup .= "\n<$wrapper>\n"; $inList = true; $nestLevel++; } $markup .= "\t<li>".ltrim($trimmedLine, '-*0123456789. '); if ( $ul = in_array($nextMark12, array('- ', '* ', '+ ')) OR preg_match('/^\d+\. /', $nextMark12) ) { $wrapper = $ul ? 'ul' : 'ol'; if ($nextIndent > $indent) { $stackList[] = "</li>\n"; $stackList[] = "</$wrapper>"; $markup .= "\n<$wrapper>\n"; $nestLevel++; } else { $markup .= "</li>\n"; } if ($nextIndent < $indent) { $shift = intval( ($indent - $nextIndent)/4 ); while ($shift--) { $markup .= array_pop($stackList); if ($nestLevel > 2) { $markup .= array_pop($stackList); } } } } else { $markup .= "</li>\n"; } continue; } if (isset($inList)) { $markup .= $trimmedLine; continue; }

Environment

  • OS: N/A
  • PHP version: 7.4.1
  • htmlup version: Jun 12, 2014

Add tests

I think adding tests and having a travis ci build report would help this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.