Retired

Dodgy delete key (retired)

Description
Loading description...
Regular Expressions
Fundamentals
  • Please sign in or sign up to leave a comment.
  • farhanaditya Avatar

    JS: Node v14 should be used along with its appropiate assertion tools (Mocha + Chai). Refer to this and this

  • wthit56 Avatar

    "There will NOT be any stray span tags between any given pair" is good. Though there may still be other tags, or even other almost span closing tags within the text (eg. </span). If it's meant to be pretty easy, and the tests don't use such tricks, it might be good to add that to the description.

  • @m1ll Avatar

    The <span> tags in the description are not displayed.

  • JohanWiltink Avatar

    Why the <span> tag?

    Why not the <del> tag? (You don't have to render that as strikethrough.)

    Or something like <span class="delete"> so you can <style> it with .delete { display: none }.

    It reads as such bad HTML for such a good kata ..

  • JohanWiltink Avatar

    Badly needs a test case for <span>delete<nbsp;>me!</span>, with a < somewhere inbetween tags.

    Also, esp. for donaldsebleung, a test case with [] or () inbetween the tags. (Donald, you know about ., don't you?)

    And a test with <span></span>, without any text inbetween.

    • cliffstamp Avatar

      Johan,

      There is a generator, it produces very basic strings with only simple spans so it can be handled by a simple regex. This was supposed to be a white kata (author's rank). Let me know if you still think it should be updated for more complicated parsing.

      Issue marked resolved by cliffstamp 6 years ago
    • JohanWiltink Avatar

      Please do not close issues too early. My issue has not been addressed.

      If this was intended to be an easy kata, the description should have specified it as an easy kata.

      Instead, everything I wrote was legal according to the description. It just wasn't tested.

      Making an easy kata can be more difficult than making a harder one, because you have to carefully specify what will and will not be tested, and then actually do that.

  • donaldsebleung Avatar

    Needs random test cases

  • matt c Avatar

    This comment has been hidden.

  • Balkoth Avatar

    Test suggestion: text with nested tags inside <span> elements, eg "Text<span> with <em>emphasis</em></span>"