Skip to content

Commit

Permalink
Merge pull request #79 from ehuss/testing
Browse files Browse the repository at this point in the history
Setup GitHub Actions
  • Loading branch information
ehuss authored Aug 12, 2023
2 parents 98c8f8a + ec02c94 commit 9a0ad83
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 43 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Test

on: [push, pull_request]

jobs:
run-tests:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: SublimeText/UnitTesting/actions/setup@v1
- uses: SublimeText/UnitTesting/actions/run-tests@v1
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

14 changes: 0 additions & 14 deletions appveyor.yml

This file was deleted.

7 changes: 3 additions & 4 deletions tests/wrap_tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,14 @@ Packages/C++/C.sublime-syntax
/* C comment style
just writing stuff. */
---
/* C comment style just writing stuff.*/
/* C comment style just writing stuff. */
===
/*
C comment style.
This probably shouldn't wrap with the opening tag, but it does in the C improved syntax. */
---
/*
C comment style. This probably shouldn't wrap with the opening tag, but it
does in the C improved syntax.*/
/* C comment style. This probably shouldn't wrap with the opening tag, but it
does in the C improved syntax. */
===
/*
<START>C comment style.
Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions wrap_plus.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import print_function
import sublime
import sublime_plugin
from . import py_textwrap as textwrap
from .wrap import py_textwrap as textwrap
import re
import time
try:
Expand Down Expand Up @@ -119,6 +118,12 @@ def set_comments(self, lc, bc, pt):

scope_r = self.view.extract_scope(pt)
scope_name = self.view.scope_name(pt)
if 'comment.block.documentation.summary.python' in scope_name:
# Recent versions of the Python syntax have a different scope for
# the first line of a docstring. This causes problems when
# wrapping the first line. This extends the scope to encompass the
# entire docstring. (I'm not sure why there is a summary scope.)
scope_r = self.view.expand_to_scope(pt, 'comment.block')
debug('scope=%r range=%r', scope_name, scope_r)

if self._is_c_comment(scope_name):
Expand Down

0 comments on commit 9a0ad83

Please sign in to comment.