yiiframework.com icon indicating copy to clipboard operation
yiiframework.com copied to clipboard

Need support markdown code with specified language on site

Open mubat opened this issue 7 years ago • 4 comments

Markdown code block with specified language rendered with errors. Code looks like:

```php 
public function behaviors() {

  $behaviors = parent::behaviors();
  return $behaviors;
}

public function getSavedImage() {
  return $this->hasOne(Image::class, ['id' => 'image_id']);
} 
\```

but it rendered like: screenshot from 2018-05-15 14-15-15

Parser couldn't recognize ```php syntax

mubat avatar May 15 '18 11:05 mubat

can you show on which page this is happening?

cebe avatar Jun 25 '18 09:06 cebe

@cebe please see https://www.yiiframework.com/extension/mubat/yii2-inherit-model-behavior

mubat avatar Jun 25 '18 09:06 mubat

thanks for reporting.

seems this can be solved by updating the markdown library to 1.2.0 as it renders fine there, however the LaTeX component of it requires 1.0.

related to https://github.com/cebe/markdown-latex/issues/12

cebe avatar Jul 24 '18 13:07 cebe

Also not work short syntax of code block in single line: code here

execut avatar May 13 '19 06:05 execut