Can't format code #415

Open
jasperblues opened this Issue Dec 6, 2013 · 8 comments

Projects

None yet

2 participants

Create some appledoc for this class: https://github.com/jasperblues/Typhoon/blob/master/Source/Component/FactoryProvider/TyphoonFactoryProvider.h

And the final code-block doesn't get formatted properly. . it splits in the middle, reverting back to normal format: file:///Users/jblues/MacProjects/Typhoon/build/reports/api/Classes/TyphoonFactoryProvider.html

Is this a bug or a user error?

Owner
tomaz commented Dec 6, 2013

Can't open local html :) Is there empty line without tab/spaces prefix in the middle? That trips many Markdown parsers.

Owner
tomaz commented Dec 6, 2013

See it now. Did you try indenting the five lines a bit more?

I did, but only one space. . . let me try a few more spaces.

Indented some more, still happening. . . a bug?

New indent shown below:

  • There is an alternative way to define the factory methods, but since it
  • involves writting a lot more code than the blocks used above, it is not
  • recommended. For the example above the code will be the following:
    *
    • (id)paymentFactory {
  • return [TyphoonFactoryProvider withProtocol:@protocol(PaymentFactory) dependencies:^(TyphoonDefinition *definition) {
    
  •   [definition injectProperty:@selector(creditService)];
    
  •   [definition injectProperty:@selector(authService)];
    
  • } factories:^(TyphoonAssistedFactoryDefinition *definition) {
    
  •   [definition factoryMethod:@selector(paymentWithStartDate:amount:) returns:[Payment class]
    
  •           initialization:^(TyphoonAssistedFactoryMethodInitializer *initializer) {
    
  •               [initializer setSelector:@selector(initWithCreditService:authService:startDate:amount:)];
    
  •               [initializer injectWithProperty:@selector(creditService)];
    
  •               [initializer injectWithProperty:@selector(authService)];
    
  •               [initializer injectWithArgumentNamed:@"startDate"];
    
  •               [initializer injectWithArgumentNamed:@"amount"];
    
  •   }];
    
  • }];
    
  • }
  • You can also use injectWithArgumentAtIndex: if you prefer to refer to the
  • factory method argument position.
    *
  • Know limitation: You can only create one factory for a given protocol.
    */
Owner
tomaz commented Dec 6, 2013

Wanted to test run the file, but forgot I'd need to refactor appledoc to make it work in Xcode 5.1 due to garbage collection...

No worries on my end. . . just thought I'd report this.

@tomaz tomaz added Bug Known labels May 16, 2014
@tomaz tomaz added this to the 3.0 milestone May 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment