Ad
  • Custom User Avatar

    nor should they. The second string has a leading space, which changes how it is rendered when printed, so it is not equivalent to the first string

  • Custom User Avatar

    Hi, I'm on it !
    Do you have some tricks for me, in order to optimize ?

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Possibly a problem with the Java version, but I can't fix that, sorry. ( But if I just return "", I do see tags in source and expected .. )

  • Custom User Avatar

    These are the tests:

    test("<p>Lorem ipsum dolor sit amet,</p><p>consectetur adipiscing elit,</p><p>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
        ,"<p>\n  Lorem ipsum dolor sit amet,\n</p>\n<p>\n  consectetur adipiscing elit,\n</p>\n<p>\n  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n</p>\n"
        );
    
    test("<html><head><title>Title</title></head><body><div><p>Paragraph</p><p>Another paragraph</p>Another <img src=\"http://somewhere on the wild weird web\" /> paragraph</div></body></html>"
        ,"<html>\n  <head>\n    <title>\n      Title\n    </title>\n  </head>\n  <body>\n    <div>\n      <p>\n        Paragraph\n      </p>\n      <p>\n        Another paragraph\n      </p>\n      Another\n      <img src=\"http://somewhere on the wild weird web\" />\n      paragraph\n    </div>\n  </body>\n</html>\n"
        );
    

    So the <title> tag has two newlines before it because there are two tags before it ( which need to be on their own line, and increase the indent ), and you may be confusing the "title" tag with the "Title" text ( I'm not sure you are seeing the tags - you are not showing them ).

    Does this answer your question?

    ( Apologies for the delay - I've been busy. )

  • Custom User Avatar
  • Custom User Avatar

    Happy to hear that :-)

  • Custom User Avatar

    still java, I guess. I have to find someone to fix it, or I will remove the translation

  • Custom User Avatar

    Thanks for enjoying it :)

  • Custom User Avatar

    Is this a random or a fixed test? If a fixed one, exactly which one?

    Please follow the Troubleshooting Guide. ( https://docs.codewars.com/training/troubleshooting ) I don't know Java and I don't know which questions to ask there, but if you post the exact failed test text I might still be able to point out possible problems.

    But please give me something to work with.

  • Custom User Avatar

    Are those newlines in the input or in the expected output?

    Also, please follow the troubleshooting guide. It tells you to mention your language, and quite a few other things, that are useful and often necessary to know. Help us help you!

  • Custom User Avatar

    Thanks!

  • Loading more items...